summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/magic.t2
-rwxr-xr-xt/op/pack.t8
-rwxr-xr-xt/op/quotemeta.t8
-rwxr-xr-xt/op/subst.t8
4 files changed, 21 insertions, 5 deletions
diff --git a/t/op/magic.t b/t/op/magic.t
index 686424f487..056ded4068 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -135,7 +135,7 @@ __END__
:endofperl
EOT
}
- if ($^O eq 'os390' or $^O eq 'vmesa') { # no shebang
+ if ($^O eq 'os390' or $^O eq 'posix-bc' or $^O eq 'vmesa') { # no shebang
$headmaybe = <<EOH ;
eval 'exec ./perl -S \$0 \${1+"\$\@"}'
if 0;
diff --git a/t/op/pack.t b/t/op/pack.t
index 1953968d3e..6b4e63484b 100755
--- a/t/op/pack.t
+++ b/t/op/pack.t
@@ -2,6 +2,12 @@
# $RCSfile: pack.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:11 $
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+ require Config; import Config;
+}
+
print "1..60\n";
$format = "c2 x5 C C x s d i l a6";
@@ -31,7 +37,7 @@ print +($x = unpack("%32B69", "\001\002\004\010\020\040\100\200\017")) == 9
? "ok 6\n" : "not ok 6 $x\n";
my $sum = 129; # ASCII
-$sum = 103 if ($^O eq 'os390' or $^O eq 'vmesa'); # EBCDIC.
+$sum = 103 if ($Config{ebcdic} eq 'define');
print +($x = unpack("%32B*", "Now is the time for all good blurfl")) == $sum
? "ok 7\n" : "not ok 7 $x\n";
diff --git a/t/op/quotemeta.t b/t/op/quotemeta.t
index 0217a67a93..98265a88d9 100755
--- a/t/op/quotemeta.t
+++ b/t/op/quotemeta.t
@@ -1,8 +1,14 @@
#!./perl
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+ require Config; import Config;
+}
+
print "1..15\n";
-if ($^O eq 'os390' or $^O eq 'vmesa') { # EBCDIC.
+if ($Config{ebcdic} eq 'define') {
$_=join "", map chr($_), 129..233;
# 105 characters - 52 letters = 53 backslashes
diff --git a/t/op/subst.t b/t/op/subst.t
index 3b3bc8d800..70219ab521 100755
--- a/t/op/subst.t
+++ b/t/op/subst.t
@@ -1,6 +1,10 @@
#!./perl
-BEGIN { @INC = ('../lib') }
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+ require Config; import Config;
+}
print "1..71\n";
@@ -183,7 +187,7 @@ tr/a-z/A-Z/;
print $_ eq 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ? "ok 52\n" : "not ok 52\n";
# same as tr/A-Z/a-z/;
-if ($^O eq 'os390' or $^O eq 'vmesa') { # EBCDIC.
+if ($Config{ebcdic} eq 'define') { # EBCDIC.
no utf8;
y[\301-\351][\201-\251];
} else { # Ye Olde ASCII. Or something like it.