Skip to content

Commit

Permalink
t/op/evalbytes.t: EBCDIC fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Williamson authored and khwilliamson committed Nov 27, 2014
1 parent f0b80b2 commit 54f604a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions t/op/evalbytes.t
Expand Up @@ -3,7 +3,7 @@
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
require './test.pl'; require './charset_tools.pl';
}

plan(tests => 8);
Expand All @@ -27,8 +27,9 @@ is evalbytes($upcode), "\xff\xfe", 'evalbytes on upgraded extra-ASCII';
use utf8;
is evalbytes($code), "\xff\xfe", 'evalbytes ignores outer utf8 pragma';
}
is evalbytes "use utf8; '\xc4\x80'", chr 256, 'use utf8 within evalbytes';
chop($upcode = "use utf8; '\xc4\x80'" . chr 256);
my $U_100 = byte_utf8a_to_utf8n("\xc4\x80");
is evalbytes "use utf8; $U_100", chr 256, 'use utf8 within evalbytes';
chop($upcode = "use utf8; $U_100" . chr 256);
is evalbytes $upcode, chr 256, 'use utf8 within evalbytes on utf8 string';
eval { evalbytes chr 256 };
like $@, qr/Wide character/, 'evalbytes croaks on non-bytes';

0 comments on commit 54f604a

Please sign in to comment.