From 31e261c719b2efe149981f4fee0ab23af28c43b9 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Tue, 27 Nov 2001 02:04:19 +0000 Subject: Portability and skippage tweaks. p4raw-id: //depot/perl@13304 --- t/op/split.t | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 't/op/split.t') 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"; -- cgit v1.2.1