In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/10574810cad15986f3d19034ef87168d2939c5e3?hp=e9c7535ad0fcaf974df036b720de4ba061847838>
- Log ----------------------------------------------------------------- commit 10574810cad15986f3d19034ef87168d2939c5e3 Author: David Mitchell <[email protected]> Date: Thu Apr 23 12:31:34 2015 +0100 ix t/uni.parser.t under EBCDIC A test I added recently made assumptions about what bytes a char utf8-encodes, which are different under UTF-EBCDIC. ----------------------------------------------------------------------- Summary of changes: t/uni/parser.t | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/t/uni/parser.t b/t/uni/parser.t index b2a9fcd..ad905b0 100644 --- a/t/uni/parser.t +++ b/t/uni/parser.t @@ -205,16 +205,20 @@ like( $@, qr/Bad name after Fï½ï½'/, 'Bad name after Fï½ï½\'' ); # was the wrong one, resulting in the lexer thinking we're still inside a # quoted string and things getting freed multiple times. # -# \xe3\x80\xb0 are the utf8 bytes making up the character \x{3030}. # The \x{3030} char isn't a legal var name, and this triggers the error. # # NB: this only failed if the closing quote of the interpolated string is # the last char of the file (i.e. no trailing \n). { - no utf8; - - fresh_perl_like(qq{use utf8; "\$\xe3\x80\xb0"}, + my $bad = "\x{3030}"; + # Write out the individual utf8 bytes making up \x{3030}. This + # avoids 'Wide char in print' warnings from test.pl. (We may still + # get that warning when compiling the prog itself, since the + # error it prints to stderr contains a wide char.) + utf8::encode($bad); + + fresh_perl_like(qq{use utf8; "\$$bad"}, qr/ \A ( \QWide character in print at - line 1.\E\n )? -- Perl5 Master Repository
