Fixes #33: Provide custom delimiters to the compiler

This commit is contained in:
hierynomus
2013-03-26 12:51:50 +01:00
parent ffce9032cc
commit 80217949e3
3 changed files with 83 additions and 12 deletions
@@ -516,6 +516,12 @@ public class MustacheTest
}));
}
@Test public void testNonStandardDefaultDelims () {
test(Mustache.compiler().withDelims(new Mustache.Delims("<% %>")), "bar", "<%foo%>", new Object() {
String foo = "bar";
});
}
protected void test (Mustache.Compiler compiler, String expected, String template, Object ctx)
{
assertEquals(expected, compiler.compile(template).execute(ctx));