In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/2c2284d8d809e9f9c80b47ca3dd3d3ddd99d8c13?hp=5ee57374e52ac64a2ab7681c2e0fa832e1c3a601>
- Log ----------------------------------------------------------------- commit 2c2284d8d809e9f9c80b47ca3dd3d3ddd99d8c13 Author: Karl Williamson <[email protected]> Date: Thu Oct 27 18:58:18 2016 -0600 Fix test to be EBCDIC friendly Commit da42332b10691ba7af7550035ffc7f46c87e4e66 introduced a new test. But on EBCDIC platforms that test doesn't do what it is intended. It uses \xE4, assuming it will have a different representation when encoded in UTF-8, and it is trying to test that having a different representation still works. But \xE4 on EBCDIC is a UTF-8 invariant (CAPITAL U). perlhacktips gives some suggestions on writing tests that work on both character sets. In this case \xB6, that is mentioned there, works, as it is UTF-8 variant on both character sets, and all EBCDIC code pages that have ever been supported by Perl. ----------------------------------------------------------------------- Summary of changes: t/re/pat.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/re/pat.t b/t/re/pat.t index 2a8fe859fa..6a711222cf 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -1802,10 +1802,10 @@ EOP } { - my $str = "a\xE4"; - ok( $str =~ m{^(a|a\x{e4})$}, "fix [perl #129950] - latin1 case" ); + my $str = "a\xB6"; + ok( $str =~ m{^(a|a\x{b6})$}, "fix [perl #129950] - latin1 case" ); utf8::upgrade($str); - ok( $str =~ m{^(a|a\x{e4})$}, "fix [perl #129950] - utf8 case" ); + ok( $str =~ m{^(a|a\x{b6})$}, "fix [perl #129950] - utf8 case" ); } } # End of sub run_tests -- Perl5 Master Repository
