Change 13304 by jhi@alpha on 2001/11/27 02:04:19
Portability and skippage tweaks.
Affected files ...
.... //depot/perl/t/op/split.t#26 edit
Differences ...
==== //depot/perl/t/op/split.t#26 (xtext) ====
Index: perl/t/op/split.t
--- perl/t/op/split.t.~1~ Mon Nov 26 19:15:06 2001
+++ perl/t/op/split.t Mon Nov 26 19:15:06 2001
@@ -168,8 +168,8 @@
}
{
- 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 @@
}
{
- # 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 "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";
End of Patch.