瀏覽代碼

Unit Tests for comment ending tag (Compiler Version)

tags/0.5.0-vsc
Sahab Yazdani 15 年之前
父節點
當前提交
ba8c7d39b6
共有 1 個文件被更改,包括 17 次插入2 次删除
  1. +17
    -2
      test/unit.compiler.js

+ 17
- 2
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(
'<h1>{{title}}{{! just something interesting... or not... }}</h1>\n',
'<h1>{{title}}{{! just something interesting... or not... !}}</h1>\n',
{
title: function() {
return "A Comedy of Errors";


Loading…
取消
儲存