summaryrefslogtreecommitdiff
path: root/t/op/split.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/split.t')
-rwxr-xr-xt/op/split.t30
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";