diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-03-10 22:17:31 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-03-05 21:48:24 -0700 |
commit | 6345b1dc4ca7689d528e854f361443fce332ee9b (patch) | |
tree | bd003a63f9ada0e0af7b44510777f48595d36aae /t/base | |
parent | 69929f1d944a854768112310eafb7cca2020bd6c (diff) | |
download | perl-6345b1dc4ca7689d528e854f361443fce332ee9b.tar.gz |
t/base/lex.t: Generalize for EBCDIC platforms
\xE2 is 'S' in EBCDIC, and so is ASCII there. We need something that is
an alpha on both platforms that isn't ASCII. \xDF works.
Also, 65 may not be "A" on a non-ASCII platform, so use 65 instead of
'A' where 65 is wanted
Diffstat (limited to 't/base')
-rw-r--r-- | t/base/lex.t | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/t/base/lex.t b/t/base/lex.t index 6a8ac613f5..0a07ab73c3 100644 --- a/t/base/lex.t +++ b/t/base/lex.t @@ -251,8 +251,9 @@ print ((exists $str{xyz::bar} ? "" : "not ")."ok $test\n"); ++$test; sub foo::::::bar { print "ok $test\n"; $test++ } foo::::::bar; -eval "\$x =\xE2foo"; -if ($@ =~ /Unrecognized character \\xE2; marked by <-- HERE after \$x =<-- HERE near column 5/) { print "ok $test\n"; } else { print "not ok $test\n"; } +# \xDF is a non-ASCII alpha on both ASCII and EBCDIC. +eval "\$x =\xDFfoo"; +if ($@ =~ /Unrecognized character \\xDF; marked by <-- HERE after \$x =<-- HERE near column 5/) { print "ok $test\n"; } else { print "not ok $test\n"; } $test++; # Is "[~" scanned correctly? @@ -383,7 +384,7 @@ eval "package v10::foo; sub test2 { return 'v10::foo' } print "not " unless $output eq 'v10::foo'; print "ok $test - call a function in package v10::foo\n"; $test++; -print "not " unless (1?v65:"bar") eq 'A'; +print "not " unless (1?v65:"bar") eq chr(65); print "ok $test - colon detection after vstring does not break ? vstring :\n"; $test++; if (ord("\t") == 9) { print v35; |