Release commit for 1.000006
[scpubgit/HTML-String.git] / xt / tt.t
diff --git a/xt/tt.t b/xt/tt.t
index 02439a7..a370a1a 100644 (file)
--- a/xt/tt.t
+++ b/xt/tt.t
@@ -31,10 +31,20 @@ is(
 # Check we aren't nailed by https://rt.perl.org/rt3/Ticket/Display.html?id=49594
 
 is(
-    do_tt('<foo>"$bar"</foo>'."\n"),
-    '<foo>"$bar"</foo>'."\n"
+    do_tt('<foo>"$b\\ar"</foo>'."\n"),
+    '<foo>"$b\\ar"</foo>'."\n"
 );
 
+{ # non-ASCII characters can also trigger the bug
+
+    use utf8;
+
+    is(
+        do_tt('<li>foo – bar.</li>', {}),
+        '<li>foo – bar.</li>',
+    );
+}
+
 is(
     do_tt(
         '[% FOREACH item IN items %][% item %][% END %]',
@@ -47,15 +57,6 @@ is(
 is( do_tt('"0"', {}), '"0"' );
 
 {
-    use utf8;
-
-    is(
-        do_tt('<li>foo – bar.</li>', {}),
-        '<li>foo – bar.</li>',
-    );
-}
-
-{
     my $tmpl = q[
         [%- MACRO test(name, value) BLOCK;
             IF !value.length;