summaryrefslogtreecommitdiff
path: root/t/op/bop.t
diff options
context:
space:
mode:
authorPeter Prymmer <PPrymmer@factset.com>2001-03-28 11:09:57 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-29 14:17:48 +0000
commit210db7fc53b6b7664595bb19b3377dc4d623b968 (patch)
tree59dc8c61a36d7f5670c15593df295882a4da3d1d /t/op/bop.t
parent48a293f80d23821f3c0607e55e7a7df61f5cff78 (diff)
downloadperl-210db7fc53b6b7664595bb19b3377dc4d623b968.tar.gz
some tests (was Re: Perl5.7.* Unicode/EBCDIC status.)
Message-ID: <Pine.OSF.4.10.10103281858520.314137-100000@aspara.forte.com> p4raw-id: //depot/perl@9434
Diffstat (limited to 't/op/bop.t')
-rwxr-xr-xt/op/bop.t29
1 files changed, 22 insertions, 7 deletions
diff --git a/t/op/bop.t b/t/op/bop.t
index 0354f009f9..c433875aa8 100755
--- a/t/op/bop.t
+++ b/t/op/bop.t
@@ -99,12 +99,20 @@ print "ok 35\n" if sprintf("%vd", $a) eq '248.444';
# UTF8 ~ behaviour
#
+my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0;
+
my @not36;
for (0x100...0xFFF) {
$a = ~(chr $_);
- push @not36, sprintf("%#03X", $_)
- if $a ne chr(~$_) or length($a) != 1 or ~$a ne chr($_);
+ if ($Is_EBCDIC) {
+ push @not36, sprintf("%#03X", $_)
+ if $a ne chr(~$_) or length($a) != 1;
+ }
+ else {
+ push @not36, sprintf("%#03X", $_)
+ if $a ne chr(~$_) or length($a) != 1 or ~$a ne chr($_);
+ }
}
if (@not36) {
print "# test 36 failed\n";
@@ -117,10 +125,17 @@ my @not37;
for my $i (0xEEE...0xF00) {
for my $j (0x0..0x120) {
$a = ~(chr ($i) . chr $j);
- push @not37, sprintf("%#03X %#03X", $i, $j)
- if $a ne chr(~$i).chr(~$j) or
- length($a) != 2 or
- ~$a ne chr($i).chr($j);
+ if ($Is_EBCDIC) {
+ push @not37, sprintf("%#03X %#03X", $i, $j)
+ if $a ne chr(~$i).chr(~$j) or
+ length($a) != 2;
+ }
+ else {
+ push @not37, sprintf("%#03X %#03X", $i, $j)
+ if $a ne chr(~$i).chr(~$j) or
+ length($a) != 2 or
+ ~$a ne chr($i).chr($j);
+ }
}
}
if (@not37) {
@@ -129,7 +144,7 @@ if (@not37) {
}
print "ok 37\n";
-print "not " unless ~chr(~0) eq "\0";
+print "not " unless ~chr(~0) eq "\0" or $Is_EBCDIC;
print "ok 38\n";
my @not39;