BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
- unless (exists $open::layers{'perlio'}) {
+ unless (find PerlIO::Layer 'perlio') {
print "1..0 # Skip: not perlio\n";
exit 0;
}
}
+no utf8; # needed for use utf8 not griping about the raw octets
+
$| = 1;
my $total_tests = 25;
if (ord('A') == 193) { $total_tests = 24; } # EBCDIC platforms do not warn on UTF-8
# Now let's make it suffer.
open F, ">", "a" or die $!;
my $w;
-eval {local $SIG{__WARN__} = sub { $w = $_[0] }; print F $a; };
+{
+ use warnings 'utf8';
+ local $SIG{__WARN__} = sub { $w = $_[0] };
+ print F $a;
+}
print "not " if ($@ || $w !~ /Wide character in print/i);
print "ok 22\n";
}
eval { sprintf "%vd\n", $x; }
}
+close F;
unlink('a');