X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xt%2Ftt.t;h=573c141bf469ff3544a17dd4077ea9274ee40631;hb=10c4bc68b3d7aa623b7f87c5366afe0b53cd871d;hp=b8c16e42e4fed4e7a44e1d60ea269c1aaa6de6b9;hpb=f49292d9c720aace6fb382ae7fc2e3056b9e6357;p=scpubgit%2FHTML-String.git
diff --git a/xt/tt.t b/xt/tt.t
index b8c16e4..573c141 100644
--- a/xt/tt.t
+++ b/xt/tt.t
@@ -23,4 +23,27 @@ is(
'Hi <bob>',
);
+is(
+ do_tt('[% foo | no_escape %]', { foo => 'Hi ' }),
+ 'Hi ',
+);
+
+# Check we aren't nailed by https://rt.perl.org/rt3/Ticket/Display.html?id=49594
+
+is(
+ do_tt('"$bar"'."\n"),
+ '"$bar"'."\n"
+);
+
+is(
+ do_tt(
+ '[% FOREACH item IN items %][% item %][% END %]',
+ { items => [ '', '-> & so "on" <-' ] }
+ ),
+ '<script>alert("lalala")</script>'
+ .'-> & so "on" <-'
+);
+
+is( do_tt('"0"', {}), '"0"' );
+
done_testing;