Explorar el Código

Unit Test for Issue #79

tags/0.5.0-vsc
thegrandpoobah hace 15 años
padre
commit
38bfdf0c72
Se han modificado 2 ficheros con 37 adiciones y 1 borrados
  1. +18
    -0
      test/unit.compiler.js
  2. +19
    -1
      test/unit.interpreter.js

+ 18
- 0
test/unit.compiler.js Ver fichero

@@ -685,4 +685,22 @@ test("Regression Suite", function() {
'mustache is awesome!',
'Issue 46'
);
// matches Issue #79
equals(
Mustache.to_html(
'{{#inner}}{{f}}{{#inner}}{{b}}{{/inner}}{{/inner}}'
, {
inner: [{
f: 'foo'
, inner: [{
b: 'bar'
}]
}]
}
, {}
)
, 'foobar'
, 'Nested Sections with the same name'
);
});

+ 19
- 1
test/unit.interpreter.js Ver fichero

@@ -588,7 +588,7 @@ test("Demo", function() {
});

test("Regression Suite", function() {
expect(3);
expect(4);
// matches bug_11_eating_whitespace.html
equals(
@@ -622,4 +622,22 @@ test("Regression Suite", function() {
'mustache is awesome!',
'Issue 46'
);
// matches Issue #79
equals(
Mustache.to_html(
'{{#inner}}{{f}}{{#inner}}{{b}}{{/inner}}{{/inner}}'
, {
inner: [{
f: 'foo'
, inner: [{
b: 'bar'
}]
}]
}
, {}
)
, 'foobar'
, 'Nested Sections with the same name'
);
});

Cargando…
Cancelar
Guardar