diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-27 02:04:19 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-27 02:04:19 +0000 |
commit | 31e261c719b2efe149981f4fee0ab23af28c43b9 (patch) | |
tree | da65121bd38435222374a0c0e0a6ac4b59619014 /t/op/split.t | |
parent | 4d7ead49781ee2f171e546bade98da75133c1ec4 (diff) | |
download | perl-31e261c719b2efe149981f4fee0ab23af28c43b9.tar.gz |
Portability and skippage tweaks.
p4raw-id: //depot/perl@13304
Diffstat (limited to 't/op/split.t')
-rwxr-xr-x | t/op/split.t | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/t/op/split.t b/t/op/split.t index f9c3bb981b..9e0beeeba9 100755 --- a/t/op/split.t +++ b/t/op/split.t @@ -168,8 +168,8 @@ print "ok 32\n"; } { - my $x = chr(123); - my @a = map ord, split(/$x/, join("", map chr, (1234, 123, 2345))); + my $x = 'A'; + my @a = map ord, split(/$x/, join("", map chr, (1234, ord($x), 2345))); print "not " unless "@a" eq "1234 2345"; print "ok 34\n"; } @@ -193,14 +193,18 @@ print "ok 32\n"; } { - # bug id 20000426.003 + if (ord('A') == 193) { + print "ok 36 # Skip: EBCDIC\n"; + } else { + # bug id 20000426.003 - my $s = "\x20\x40\x{80}\x{100}\x{80}\x40\x20"; + my $s = "\x20\x40\x{80}\x{100}\x{80}\x40\x20"; - my ($a, $b, $c) = split(/\x40/, $s); - print "not " - unless $a eq "\x20" && $b eq "\x{80}\x{100}\x{80}" && $c eq $a; - print "ok 36\n"; + my ($a, $b, $c) = split(/\x40/, $s); + print "not " + unless $a eq "\x20" && $b eq "\x{80}\x{100}\x{80}" && $c eq $a; + print "ok 36\n"; + } my ($a, $b) = split(/\x{100}/, $s); print "not " unless $a eq "\x20\x40\x{80}" && $b eq "\x{80}\x40\x20"; @@ -210,9 +214,13 @@ print "ok 32\n"; print "not " unless $a eq "\x20\x40" && $b eq "\x40\x20"; print "ok 38\n"; - my ($a, $b) = split(/\x40\x{80}/, $s); - print "not " unless $a eq "\x20" && $b eq "\x{100}\x{80}\x40\x20"; - print "ok 39\n"; + if (ord('A') == 193) { + print "ok 39 # Skip: EBCDIC\n"; + } else { + my ($a, $b) = split(/\x40\x{80}/, $s); + print "not " unless $a eq "\x20" && $b eq "\x{100}\x{80}\x40\x20"; + print "ok 39\n"; + } my ($a, $b, $c) = split(/[\x40\x{80}]+/, $s); print "not " unless $a eq "\x20" && $b eq "\x{100}" && $c eq "\x20"; |