Skip to content

Commit

Permalink
test improperly closed tags
Browse files Browse the repository at this point in the history
  • Loading branch information
spullara committed Feb 27, 2017
1 parent bc86d3b commit 9efa19d
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,15 @@ public void testOutputDelimiters() {
assertEquals("{{##", sw.toString());
}

public void testImproperlyClosedVariable() throws IOException {
try {
new DefaultMustacheFactory().compile(new StringReader("{{{#containers}} {{/containers}}"), "example");
fail("Should have throw MustacheException");
} catch (MustacheException actual) {
assertEquals("Improperly closed variable in example:1 @[example:1]", actual.getMessage());
}
}

public void testLimitedDepthRecursion() {
try {
StringWriter sw = execute("infiniteparent.html", new Context());
Expand Down

0 comments on commit 9efa19d

Please sign in to comment.