BEGIN {
chdir 't' if -d 't';
require './test.pl';
+ require './charset_tools.pl';
skip_all_without_unicode_tables();
}
-plan (tests => 56);
+plan (tests => 57);
use utf8;
use open qw( :utf8 :std );
{stderr => 1}, "RT# 124216");
}
-SKIP: { # [perl #128738]
- {
- # This caused a memory fault
- no warnings "utf8";
- no warnings 'deprecated'; # This is above IV_MAX on 32 bit machines
- is ("abc", eval qq[qq\x{8000_0000}abc\x{8000_0000}]);
- }
+SKIP: {
use Config;
if ($Config{uvsize} < 8) {
- skip("test is only valid on 64-bit ints", 2);
+ skip("test is only valid on 64-bit ints", 4);
}
else {
- no warnings 'deprecated';
my $a;
- eval "\$a = q \x{ffffffff}Hello, \\\\whirled!\x{ffffffff}";
+ my $b;
+
+ # This caused a memory fault [perl #128738]
+ $b = byte_utf8a_to_utf8n("\xFE\x82\x80\x80\x80\x80\x80"); # 0x80000000
+ eval "\$a = q ${b}abc${b}";
+ is $@, "",
+ "No errors in eval'ing a string with large code point delimiter";
+ is $a, 'abc',
+ "Got expected result in eval'ing a string with a large code point"
+ . " delimiter";
+
+ $b = byte_utf8a_to_utf8n("\xFE\x83\xBF\xBF\xBF\xBF\xBF"); # 0xFFFFFFFF
+ eval "\$a = q ${b}Hello, \\\\whirled!${b}";
is $@, "",
"No errors in eval'ing a string with large code point delimiter";
is $a, 'Hello, \whirled!',