This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
dounwind(): do a POPBLOCK for final cx frame.
[perl5.git] / t / op / evalbytes.t
index 9961072..cca7c04 100644 (file)
@@ -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);
@@ -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';