summaryrefslogtreecommitdiff
path: root/t/lib/b.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-07-15 00:10:41 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-07-15 00:10:41 +0000
commit885a8af1ca9266f6a09cb65ff06fa4233f6dab89 (patch)
treef284dc9885bb92458a6276f1f2f375f371ab17e9 /t/lib/b.t
parenta1b2c42982f9ed83e8c68e100462da902ee3b906 (diff)
downloadperl-885a8af1ca9266f6a09cb65ff06fa4233f6dab89.tar.gz
lib/b test fixes from Peter Prymmer.
p4raw-id: //depot/perl@6411
Diffstat (limited to 't/lib/b.t')
-rwxr-xr-xt/lib/b.t45
1 files changed, 39 insertions, 6 deletions
diff --git a/t/lib/b.t b/t/lib/b.t
index aceef28116..96ba1264a6 100755
--- a/t/lib/b.t
+++ b/t/lib/b.t
@@ -31,7 +31,15 @@ print "not " if "{\n \$test /= 2 if ++\$test;\n}" ne
$deparse->coderef2text(sub {++$test and $test/=2;});
ok;
-my $a = `$^X -I../lib -MO=Deparse -anle 1 2>&1`;
+my $a;
+my $Is_VMS = $^O eq 'VMS';
+if ($Is_VMS) {
+ $^X = "MCR $^X";
+ $a = `$^X "-I../lib" "-MO=Deparse" -anle "1"`;
+}
+else {
+ $a = `$^X -I../lib -MO=Deparse -anle 1 2>&1`;
+}
$a =~ s/-e syntax OK\n//g;
$b = <<'EOF';
@@ -49,18 +57,33 @@ print "# [$a]\n\# vs\n# [$b]\nnot " if $a ne $b;
ok;
#6
-$a = `$^X -I../lib -MO=Debug -e 1 2>&1`;
+if ($Is_VMS) {
+ $a = `$^X "-I../lib" "-MO=Debug" -e "1"`;
+}
+else {
+ $a = `$^X -I../lib -MO=Debug -e 1 2>&1`;
+}
print "not " unless $a =~
/\bLISTOP\b.*\bOP\b.*\bCOP\b.*\bOP\b/s;
ok;
#7
-$a = `$^X -I../lib -MO=Terse -e 1 2>&1`;
+if ($Is_VMS) {
+ $a = `$^X "-I../lib" "-MO=Terse" -e "1"`;
+}
+else {
+ $a = `$^X -I../lib -MO=Terse -e 1 2>&1`;
+}
print "not " unless $a =~
/\bLISTOP\b.*leave.*\bOP\b.*enter.*\bCOP\b.*nextstate.*\bOP\b.*null/s;
ok;
-$a = `$^X -I../lib -MO=Terse -ane "s/foo/bar/" 2>&1`;
+if ($Is_VMS) {
+ $a = `$^X "-I../lib" "-MO=Terse" -ane "s/foo/bar/"`;
+}
+else {
+ $a = `$^X -I../lib -MO=Terse -ane "s/foo/bar/" 2>&1`;
+}
$a =~ s/\(0x[^)]+\)//g;
$a =~ s/\[[^\]]+\]//g;
$a =~ s/-e syntax OK//;
@@ -80,7 +103,12 @@ $b =~ s/\s+$//;
print "# [$a] vs [$b]\nnot " if $a ne $b;
ok;
-chomp($a = `$^X -I../lib -MB::Stash -Mwarnings -e1`);
+if ($Is_VMS) {
+ chomp($a = `$^X "-I../lib" "-MB::Stash" "-Mwarnings" -e "1"`);
+}
+else {
+ chomp($a = `$^X -I../lib -MB::Stash -Mwarnings -e1`);
+}
$a = join ',', sort split /,/, $a;
$a =~ s/-uWin32,// if $^O eq 'MSWin32';
$a =~ s/-u(Cwd|File|File::Copy|OS2),//g if $^O eq 'os2';
@@ -93,6 +121,11 @@ if ($Config{static_ext} eq ' ') {
print "ok $test # skipped: one or more static extensions\n"; $test++;
}
-$a = `$^X -I../lib -MO=Showlex -e "my %one" 2>&1`;
+if ($Is_VMS) {
+ $a = `$^X "-I../lib" "-MO=Showlex" -e "my %one"`;
+}
+else {
+ $a = `$^X -I../lib -MO=Showlex -e "my %one" 2>&1`;
+}
print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%one.*sv_undef.*HV/s;
ok;