summaryrefslogtreecommitdiff
path: root/t/uni
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-08-04 14:07:53 -0600
committerKarl Williamson <khw@cpan.org>2016-08-05 12:56:06 -0600
commit2aa61ac397079a33eb3c36c2e7c1f41be224c657 (patch)
tree64690589c86b7f58d89552ff8dbcf2cfb2edaf0d /t/uni
parent9e9fbcaf153d3c9eb897b5cab54a102632df4c78 (diff)
downloadperl-2aa61ac397079a33eb3c36c2e7c1f41be224c657.tar.gz
PATCH: [perl #128738] Large code pt as string delim
The bug here is simply an I32 was used when an IV was needed. One could argue that there should be that the parser should refuse to accept something larger than an IV. I chose not to do that, as this is a deprecated usage, which generates a warning by default and will be a syntax error anyway in a future release.
Diffstat (limited to 't/uni')
-rw-r--r--t/uni/parser.t18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/uni/parser.t b/t/uni/parser.t
index a428786039..f1ce90a0c8 100644
--- a/t/uni/parser.t
+++ b/t/uni/parser.t
@@ -9,7 +9,7 @@ BEGIN {
skip_all_without_unicode_tables();
}
-plan (tests => 53);
+plan (tests => 55);
use utf8;
use open qw( :utf8 :std );
@@ -229,6 +229,22 @@ like( $@, qr/Bad name after Foo'/, 'Bad name after Foo\'' );
{stderr => 1}, "RT# 124216");
}
+SKIP: { # [perl #128738]
+ use Config;
+ if ($Config{uvsize} < 8) {
+ skip("test is only valid on 64-bit ints", 2);
+ }
+ else {
+ my $a;
+ eval "\$a = q \x{ffffffff}Hello, \\\\whirled!\x{ffffffff}";
+ is $@, "",
+ "No errors in eval'ing a string with large code point delimiter";
+ is $a, 'Hello, \whirled!',
+ "Got expected result in eval'ing a string with a large code point"
+ . " delimiter";
+ }
+}
+
# New tests go here ^^^^^