ソースを参照

Unit Tests for comment ending tag (Interpreter Version)

tags/0.5.0-vsc
Sahab Yazdani 15年前
コミット
bff6686bd4
1個のファイルの変更17行の追加2行の削除
  1. +17
    -2
      test/unit.interpreter.js

+ 17
- 2
test/unit.interpreter.js ファイルの表示

@@ -385,12 +385,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";


読み込み中…
キャンセル
保存