diff --git a/test/unit.compiler.js b/test/unit.compiler.js index 8e13b7d..8d04f1e 100644 --- a/test/unit.compiler.js +++ b/test/unit.compiler.js @@ -403,12 +403,27 @@ test("'=' (Set Delimiter)", function() { }); test("'!' (Comments)", function() { - expect(1); + expect(4); + equals( + Mustache.to_html('{{! this is a single line comment !}}'), + '', + 'Single Line Comments'); + + equals( + Mustache.to_html('{{!this is a multiline comment\ni said this is a multiline comment!}}'), + '', + 'Multiline Comments'); + + equals( + Mustache.to_html('{{!this {{is}} {{#a}} {{/multiline}} comment\ni {{^said}} ! hello !! bye!}}'), + '', + 'Correct tokenization'); + // matches comments.html equals( Mustache.to_html( - '