diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-03-26 14:06:50 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-11-01 22:06:56 -0600 |
commit | f87af7115945fa6571c49bc43940a3cead44ed3c (patch) | |
tree | 5843f99dad3d9421601c67658e1657fd5ceb9714 /t | |
parent | 43bf0d50d71d3932b34b930f2d756c08c25349fe (diff) | |
download | perl-f87af7115945fa6571c49bc43940a3cead44ed3c.tar.gz |
op/index.t: Fix tests for EBCDIC
Commit 8a38a836 erroneously translates literals into the native
encoding, causing a double translation, which is garbage.
Diffstat (limited to 't')
-rw-r--r-- | t/op/index.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/op/index.t b/t/op/index.t index 2bb6cd14a6..fd5a98fc48 100644 --- a/t/op/index.t +++ b/t/op/index.t @@ -93,8 +93,8 @@ is(rindex($a, "foo", ), 0); { my $search; my $text; - $search = latin1_to_native("foo \xc9 bar"); - $text = latin1_to_native("a\xa3\xa3a $search $search quux"); + $search = "foo " . latin1_to_native("\xc9") . " bar"; + $text = "a" . latin1_to_native("\xa3\xa3") . "a $search $search quux"; my $text_utf8 = $text; utf8::upgrade($text_utf8); @@ -130,13 +130,13 @@ is(rindex($a, "foo", ), 0); } SKIP: { - skip "UTF-EBCDIC is limited to 0x7fffffff", 3 if ord("A") == 193; + skip "UTF-EBCDIC is limited to 0x7fffffff", 3 if $::IS_EBCDIC; - my $a = "\x{80000000}"; + my $a = eval q{"\x{80000000}"}; my $s = $a.'defxyz'; is(index($s, 'def'), 1, "0x80000000 is a single character"); - my $b = "\x{fffffffd}"; + my $b = eval q{"\x{fffffffd}"}; my $t = $b.'pqrxyz'; is(index($t, 'pqr'), 1, "0xfffffffd is a single character"); |