In C<use utf8; a=>'b'>, do not set utf8 flag on 'a' [perl #68812]
[p5sagit/p5-mst-13.2.git] / t / op / taint.t
old mode 100755 (executable)
new mode 100644 (file)
index 01ab368..87592d5
@@ -17,7 +17,7 @@ use Config;
 use File::Spec::Functions;
 
 BEGIN { require './test.pl'; }
-plan tests => 298;
+plan tests => 301;
 
 $| = 1;
 
@@ -430,8 +430,7 @@ SKIP: {
     # just because Errno possibly failing.
     test eval('$!{ENOENT}') ||
        $! == 2 || # File not found
-       ($Is_Dos && $! == 22) ||
-       ($^O eq 'mint' && $! == 33);
+       ($Is_Dos && $! == 22);
 
     test !eval { open FOO, "> $foo" }, 'open for write';
     test $@ =~ /^Insecure dependency/, $@;
@@ -1303,6 +1302,19 @@ foreach my $ord (78, 163, 256) {
     }
 }
 
+# Bug RT #52552 - broken by change at git commit id f337b08
+{
+    my $x = $TAINT. q{print "Hello world\n"};
+    my $y = pack "a*", $x;
+    ok(tainted($y), "pack a* preserves tainting");
+
+    my $z = pack "A*", q{print "Hello world\n"}.$TAINT;
+    ok(tainted($z), "pack A* preserves tainting");
+
+    my $zz = pack "a*a*", q{print "Hello world\n"}, $TAINT;
+    ok(tainted($zz), "pack a*a* preserves tainting");
+}
+
 # This may bomb out with the alarm signal so keep it last
 SKIP: {
     skip "No alarm()"  unless $Config{d_alarm};