diff options
author | kpdecker <kpdecker@gmail.com> | 2014-07-07 00:01:17 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2014-07-07 00:01:17 -0500 |
commit | 107aa4a66ada6fd18e9a890c434f382bae2da998 (patch) | |
tree | 33236ad3aeabacc9fb5ac9aa974ff80d4980fe82 | |
parent | 9a1eda2caff7a5eadc43fbb89db44c0205c6c03e (diff) | |
download | handlebars.js-107aa4a66ada6fd18e9a890c434f382bae2da998.zip handlebars.js-107aa4a66ada6fd18e9a890c434f382bae2da998.tar.gz handlebars.js-107aa4a66ada6fd18e9a890c434f382bae2da998.tar.bz2 |
Add test case for GH-731
-rw-r--r-- | spec/regressions.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/regressions.js b/spec/regressions.js index 7412cd3..214a142 100644 --- a/spec/regressions.js +++ b/spec/regressions.js @@ -118,6 +118,10 @@ describe('Regressions', function() { }, Error, 'You must pass a string or Handlebars AST to Handlebars.precompile. You passed null'); }); + it('GH-731: zero context rendering', function() { + shouldCompileTo('{{#foo}} This is {{bar}} ~ {{/foo}}', {foo: 0, bar: 'OK'}, ' This is ~ '); + }); + if (Handlebars.AST) { it("can pass through an already-compiled AST via compile/precompile", function() { equal(Handlebars.compile(new Handlebars.AST.ProgramNode([ new Handlebars.AST.ContentNode("Hello")]))(), 'Hello'); |