Enabled more tests, fixed more bugs.

Mainly we also needed to trim around comment tags, but also there were a bunch
of tricky edge cases that were only partially addressed. This is some edgy
business!
This commit is contained in:
Michael Bayne
2014-12-16 14:47:31 -08:00
parent 0e2a7d13d5
commit 09fee0f037
3 changed files with 32 additions and 22 deletions
@@ -439,6 +439,11 @@ public class MustacheTest
test("Begin.\nEnd.\n", "Begin.\n{{=@ @=}}\nEnd.\n", context());
}
@Test public void testNoTrimNewlineFromNestedTagAt0 () {
test(" | \n | \n", " | {{^boolean}}{{! comment }}\n {{/boolean}} | \n",
context("boolean", false));
}
@Test public void testTrimBlank () {
Mustache.StringSegment str = new Mustache.StringSegment(" \r\n ", false);
check("Text( )-1/0", str.trimLeadBlank().toString());
@@ -47,7 +47,7 @@ public class SpecRunner extends BlockJUnit4ClassRunner
private List<FrameworkMethod> computeTests () throws InitializationError {
String[] groups = new String[] {
// "comments",
"comments",
"delimiters",
"interpolation",
"inverted",