-# $Id: enc_eucjp.t,v 1.2 2003/02/06 01:52:11 dankogai Exp dankogai $
-# This is the twin of enc_utf8.t, the only difference is that
-# this has "use encoding 'euc-jp'".
+# $Id: enc_eucjp.t,v 1.4 2003/04/24 17:43:16 dankogai Exp $
+# This is the twin of enc_utf8.t .
BEGIN {
require Config; import Config;
my @f;
for my $i (0..$#c) {
+ no warnings 'pack';
push @f, "f$i";
open(F, ">f$i") or die "$0: failed to open 'f$i' for writing: $!";
binmode(F, ":utf8");
local $SIG{__WARN__} = sub { $a = shift };
eval { <F> }; # This should get caught.
}
+close F;
print $a =~ qr{^utf8 "\\x80" does not map to Unicode} ?
"ok $t - illegal utf8 input\n" : "not ok $t - illegal utf8 input: a = " . unpack("H*", $a) . "\n";