@@ -62,10 +62,29 @@ public void testParentReplace() throws MustacheException, IOException, Execution
6262 MustacheFactory c = new DefaultMustacheFactory (root );
6363 Mustache m = c .compile ("replace.html" );
6464 StringWriter sw = new StringWriter ();
65- m .execute (sw , new Object () { String replace = "true " ; });
65+ m .execute (sw , new Object () { String replace = "false " ; });
6666 assertEquals (getContents (root , "replace.txt" ), sw .toString ());
6767 }
6868
69+ @ Test
70+ public void testSubBlockCaching () throws MustacheException , IOException , ExecutionException , InterruptedException {
71+ MustacheFactory c = new DefaultMustacheFactory (root );
72+ Mustache m = c .compile ("subblockchild1.html" );
73+ StringWriter sw = new StringWriter ();
74+ m .execute (sw , new Object () {});
75+ assertEquals (getContents (root , "subblockchild1.txt" ), sw .toString ());
76+
77+ m = c .compile ("subblockchild2.html" );
78+ sw = new StringWriter ();
79+ m .execute (sw , new Object () {});
80+ assertEquals (getContents (root , "subblockchild2.txt" ), sw .toString ());
81+
82+ m = c .compile ("subblockchild1.html" );
83+ sw = new StringWriter ();
84+ m .execute (sw , new Object () {});
85+ assertEquals (getContents (root , "subblockchild1.txt" ), sw .toString ());
86+ }
87+
6988 @ Test
7089 public void testSubSub () throws MustacheException , IOException , ExecutionException , InterruptedException {
7190 MustacheFactory c = new DefaultMustacheFactory (root );
0 commit comments