X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Futftaint.t;h=df99c8dc43a8d0384d03a70a2ba72ab26277e3c5;hb=584420f022db57225e9644b9c6668ff9f567984a;hp=d9614e6e877238e67ffbe1ea5af978cdede250c9;hpb=5316d14db4aade2e88cbb15cc065195245c0ec51;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/utftaint.t b/t/op/utftaint.t index d9614e6..df99c8d 100644 --- a/t/op/utftaint.t +++ b/t/op/utftaint.t @@ -23,10 +23,7 @@ plan(tests => 3*10 + 3*8 + 2*16 + 2); my $arg = $ENV{PATH}; # a tainted value use constant UTF8 => "\x{1234}"; -sub is_utf8 { - my $s = shift; - return 0xB6 != unpack('C', chr(0xB6).$s); -} +*is_utf8 = \&utf8::is_utf8; for my $ary ([ascii => 'perl'], [latin1 => "\xB6"], [utf8 => "\x{100}"]) { my $encode = $ary->[0]; @@ -144,7 +141,6 @@ for my $ary ([ascii => 'perl'], [latin1 => "\xB6"]) { } { - local @ENV{qw(PATH CDPATH IFS ENV BASH_ENV)} = (undef) x 5; fresh_perl_is('$a = substr $^X, 0, 0; /\x{100}/i; /$a\x{100}/i || print q,ok,', 'ok', {switches => ["-T", "-l"]}, "matching a regexp is taint agnostic");