diff options
Diffstat (limited to 'spec/helpers.js')
-rw-r--r-- | spec/helpers.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/helpers.js b/spec/helpers.js index 180fc98..904f56a 100644 --- a/spec/helpers.js +++ b/spec/helpers.js @@ -188,6 +188,17 @@ describe('helpers', function() { "found it! Goodbye cruel world!!"); }); + it("decimal number literals work", function() { + var string = 'Message: {{hello -1.2 1.2}}'; + var hash = {}; + var helpers = {hello: function(times, times2) { + if(typeof times !== 'number') { times = "NaN"; } + if(typeof times2 !== 'number') { times2 = "NaN"; } + return "Hello " + times + " " + times2 + " times"; + }}; + shouldCompileTo(string, [hash, helpers], "Message: Hello -1.2 1.2 times", "template with a negative integer literal"); + }); + it("negative number literals work", function() { var string = 'Message: {{hello -12}}'; var hash = {}; |