diff --git a/test/unit.compiler.js b/test/unit.compiler.js index 7f98d73..ac7460a 100644 --- a/test/unit.compiler.js +++ b/test/unit.compiler.js @@ -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' + ); }); diff --git a/test/unit.interpreter.js b/test/unit.interpreter.js index 4633c2d..18c5360 100644 --- a/test/unit.interpreter.js +++ b/test/unit.interpreter.js @@ -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' + ); });