summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-07-07 00:01:17 -0500
committerkpdecker <kpdecker@gmail.com>2014-07-07 00:01:17 -0500
commit107aa4a66ada6fd18e9a890c434f382bae2da998 (patch)
tree33236ad3aeabacc9fb5ac9aa974ff80d4980fe82
parent9a1eda2caff7a5eadc43fbb89db44c0205c6c03e (diff)
downloadhandlebars.js-107aa4a66ada6fd18e9a890c434f382bae2da998.zip
handlebars.js-107aa4a66ada6fd18e9a890c434f382bae2da998.tar.gz
handlebars.js-107aa4a66ada6fd18e9a890c434f382bae2da998.tar.bz2
Add test case for GH-731
-rw-r--r--spec/regressions.js4
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');