diff options
author | kpdecker <kpdecker@gmail.com> | 2015-04-07 23:37:38 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-04-07 23:37:38 -0500 |
commit | 2d149e779764cb373be0585c5e493da405062be6 (patch) | |
tree | 97ff4511e445c7d0a70161a0b3bbe02e7e5551e9 /spec/parser.js | |
parent | 81a4d50955b13e7d5e5052d904bb3e8c993ebb88 (diff) | |
download | handlebars.js-2d149e779764cb373be0585c5e493da405062be6.zip handlebars.js-2d149e779764cb373be0585c5e493da405062be6.tar.gz handlebars.js-2d149e779764cb373be0585c5e493da405062be6.tar.bz2 |
Add undefined and null literal support
This adds the UndefinedLiteral and NullLiteral to AST.
Fixes #990
Diffstat (limited to 'spec/parser.js')
-rw-r--r-- | spec/parser.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/parser.js b/spec/parser.js index 3d3dccf..6f5a660 100644 --- a/spec/parser.js +++ b/spec/parser.js @@ -58,6 +58,10 @@ describe('parser', function() { equals(ast_for("{{foo false}}"), "{{ PATH:foo [BOOLEAN{false}] }}\n"); }); + it('parses mustaches with undefined and null parameters', function() { + equals(ast_for("{{foo undefined null}}"), "{{ PATH:foo [UNDEFINED, NULL] }}\n"); + }); + it('parses mutaches with DATA parameters', function() { equals(ast_for("{{foo @bar}}"), "{{ PATH:foo [@PATH:bar] }}\n"); }); |