Add a failing test for "0" not being modified
[scpubgit/HTML-String.git] / xt / tt.t
diff --git a/xt/tt.t b/xt/tt.t
index 37e644d..573c141 100644 (file)
--- a/xt/tt.t
+++ b/xt/tt.t
@@ -35,4 +35,15 @@ is(
     '<foo>"$bar"</foo>'."\n"
 );
 
+is(
+    do_tt(
+        '[% FOREACH item IN items %][% item %][% END %]',
+        { items => [ '<script>alert("lalala")</script>', '-> & so "on" <-' ] }
+    ),
+    '&lt;script&gt;alert(&quot;lalala&quot;)&lt;/script&gt;'          
+        .'-&gt; &amp; so &quot;on&quot; &lt;-'
+);
+
+is( do_tt('"0"', {}), '"0"' );
+
 done_testing;