In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8182a17b47917dbffdc30aa3e9cf29249c8127ed?hp=56695c4f0a6617c7212848f1d5c4388ff21a75c8>
- Log ----------------------------------------------------------------- commit 8182a17b47917dbffdc30aa3e9cf29249c8127ed Author: Karl Williamson <[email protected]> Date: Wed Nov 16 20:18:59 2016 -0700 APItest/t/utf8.t: Fix failing EBCDIC tests I keep not getting this completely correct, hence 1069c57cb1f4e6b94f8695843243749e9511303e 162256f303e3b2f3936976e692650c18c9cad0a6 But I'm hopeful this is the final answer. We should be operating on I8 strings in this function, translating into I8 at the beginning and translating back to UTF-EBCDIC at the end (except UTF8SKIP has purposely been built for speed to not use the transform, so it operates on UTF-EBCDIC. M ext/XS-APItest/t/utf8.t commit 921139afe6c80ac45237aee91e74c6d128f2ad5d Author: Karl Williamson <[email protected]> Date: Wed Nov 16 20:17:48 2016 -0700 APItest/t/utf8.t: Fill in missing die() reason I forgot to complete this before the initial commit, so that the reason for dieing was empty. M ext/XS-APItest/t/utf8.t commit a37fb5d5d5bba7005c8ff083aaeed7ee4bc2f041 Author: Karl Williamson <[email protected]> Date: Wed Nov 16 20:15:54 2016 -0700 op/bop.t: Fix test failing on EBCDIC This recently added test did not take into account character set differences. M t/op/bop.t ----------------------------------------------------------------------- Summary of changes: ext/XS-APItest/t/utf8.t | 6 +++--- t/op/bop.t | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/XS-APItest/t/utf8.t b/ext/XS-APItest/t/utf8.t index e366254..49a6fba 100644 --- a/ext/XS-APItest/t/utf8.t +++ b/ext/XS-APItest/t/utf8.t @@ -72,7 +72,7 @@ sub start_byte_to_cont($) { my $byte = shift; my $len = test_UTF8_SKIP($byte); if ($len < 2) { - die ""; + die "start_byte_to_cont() is expecting a UTF-8 variant"; } $byte = ord native_to_I8($byte); @@ -80,8 +80,8 @@ sub start_byte_to_cont($) { # Copied from utf8.h. This gets rid of the leading 1 bits. $byte &= ((($len) >= 7) ? 0x00 : (0x1F >> (($len)-2))); - $byte |= (isASCII) ? 0x80 : ord I8_to_native("\xA0"); - return chr $byte; + $byte |= (isASCII) ? 0x80 : 0xA0; + return I8_to_native(chr $byte); } my $is64bit = length sprintf("%x", ~0) > 8; diff --git a/t/op/bop.t b/t/op/bop.t index dd5b5ef..594dd09 100644 --- a/t/op/bop.t +++ b/t/op/bop.t @@ -681,4 +681,5 @@ is $byte, "\0", "utf8 &. appends null byte"; # only visible under sanitize fresh_perl_is('$x = "UUUUUUUV"; $y = "xxxxxxx"; $x |= $y; print $x', - '}}}}}}}V', {}, "[perl #129995] access to freed memory"); + ( $::IS_EBCDIC) ? 'XXXXXXXV' : '}}}}}}}V', + {}, "[perl #129995] access to freed memory"); -- Perl5 Master Repository
