Fix bugs relating to . and this.

First, I missed some reference checks when I stopped interning names. Fixed
those.

Second, when iterating over an array which contained null elements, the wrong
thing was happening.
This commit is contained in:
Michael Bayne
2018-06-04 16:06:50 -07:00
parent b823ed87c5
commit 4533567303
4 changed files with 21 additions and 16 deletions
@@ -321,6 +321,12 @@ public abstract class SharedTests extends GWTTestCase
execute(context("things", Arrays.asList("bar", "baz", "bif"))));
}
@Test public void testNestedNullThis () {
check("bar!bif", Mustache.compiler().defaultValue("!").
compile("{{#things}}{{.}}{{/things}}").
execute(context("things", Arrays.asList("bar", null, "bif"))));
}
@Test public void testNewlineSkipping () {
testNewlineSkipping("\n");
}