summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-06-19 11:47:54 -0600
committerKarl Williamson <khw@cpan.org>2017-07-12 21:14:25 -0600
commitf4da64d47abe4315017f8bb4c0565ea96363041f (patch)
treed6d05fcd1c5e28bcc68edfcdde9c26ba7dddc73e
parentf6104ed73f9c2a5567b0b6e401f67c1b489ab0c3 (diff)
downloadperl-f4da64d47abe4315017f8bb4c0565ea96363041f.tar.gz
APItest/t/utf8_warn_base.pl: Do test on all platforms
This modifies and moves a test so it gets done on all platforms, not just 32-bit ASCII. It is an edge case on all platforms, but gives differing results, overflowing on 32-bit ones.
-rw-r--r--ext/XS-APItest/t/utf8_warn_base.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/XS-APItest/t/utf8_warn_base.pl b/ext/XS-APItest/t/utf8_warn_base.pl
index 7e3d2ef4ee..c6596cd5ba 100644
--- a/ext/XS-APItest/t/utf8_warn_base.pl
+++ b/ext/XS-APItest/t/utf8_warn_base.pl
@@ -285,16 +285,19 @@ my @tests;
0xFFFFFFFF,
(isASCII) ? 1 : 8,
],
+ [ "Lowest 33 bit code point",
+ (isASCII)
+ ? "\xfe\x84\x80\x80\x80\x80\x80"
+ : I8_to_native(
+ "\xff\xa0\xa0\xa0\xa0\xa0\xa0\xa4\xa0\xa0\xa0\xa0\xa0\xa0"),
+ ($::is64bit) ? 0x100000000 : -1, # Overflows on 32-bit systems
+ (isASCII && ! $::is64bit) ? 2 : 1,
+ ],
);
if (! $::is64bit) {
if (isASCII) {
push @tests,
- [ "Lowest 33 bit code point: overflow",
- "\xFE\x84\x80\x80\x80\x80\x80",
- -1,
- 1,
- ],
[ "overflow that old algorithm failed to detect",
"\xfe\x86\x80\x80\x80\x80\x80",
-1,