h.put("list", new String[] { "a", "b" });
TemplatesFacade env = new TestTemplatesFacade(new DefaultNavigationFactory(), new ClassTemplateLoader(getClass().getClassLoader(), TEMPLATES_LOCATION, TEMPLATES_CHARSET));
// test 1
String q = env.executeTemplate("loop.loop1", new EvaluationContext(h), null, null);
Assert.assertEquals("Hmm: \n\n0: a\n1: b\n\n", q);
// test 2
q = env.executeTemplate("loop.loop2", new EvaluationContext(h), null, null);
Assert.assertEquals("\nHmm: \n\n0: a\n1: b\n\n", q);
// test 3
h.put("list", new String[] {});
q = env.executeTemplate("loop.loop2", new EvaluationContext(h), null, null);
Assert.assertEquals("\nHmm: \n\n\n", q);
}