summaryrefslogtreecommitdiffstats
path: root/spec/tokenizer.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tokenizer.js')
-rw-r--r--spec/tokenizer.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/tokenizer.js b/spec/tokenizer.js
index 0a5143b..26a1c3b 100644
--- a/spec/tokenizer.js
+++ b/spec/tokenizer.js
@@ -322,6 +322,13 @@ describe('Tokenizer', function() {
shouldBeToken(result[2], "BOOLEAN", "false");
});
+ it('tokenizes undefined and null', function() {
+ var result = tokenize('{{ foo undefined null }}');
+ shouldMatchTokens(result, ['OPEN', 'ID', 'UNDEFINED', 'NULL', 'CLOSE']);
+ shouldBeToken(result[2], 'UNDEFINED', 'undefined');
+ shouldBeToken(result[3], 'NULL', 'null');
+ });
+
it('tokenizes hash arguments', function() {
var result = tokenize("{{ foo bar=baz }}");
shouldMatchTokens(result, ['OPEN', 'ID', 'ID', 'EQUALS', 'ID', 'CLOSE']);