summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-01 10:58:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-01 10:58:23 +0000
commitba566e15f2fea5ab804d1ca2a5c5c22540e0ee39 (patch)
treec9b3d5e44fc7eb3d224925008ee7b4be9541b2e9
parentb7bf3a0074fce3ee1630a1018af168e21ff90908 (diff)
downloadperl-ba566e15f2fea5ab804d1ca2a5c5c22540e0ee39.tar.gz
Now the test should be really testing what it's supposed to.
p4raw-id: //depot/perl@20418
-rw-r--r--ext/B/t/bytecode.t14
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/B/t/bytecode.t b/ext/B/t/bytecode.t
index d87b73223a..47bae92dc7 100644
--- a/ext/B/t/bytecode.t
+++ b/ext/B/t/bytecode.t
@@ -1,6 +1,10 @@
#!./perl
BEGIN {
+ if ($^O eq 'VMS') {
+ print "1..0 # skip - Bytecode/ByteLoader doesn't work on VMS\n";
+ exit 0;
+ }
chdir 't' if -d 't';
@INC = qw(../lib);
require './test.pl'; # for run_perl()
@@ -8,7 +12,7 @@ BEGIN {
use strict;
my $test = 'bytecode.pl';
-END { 1 while unlink $test }
+END { 1 while unlink $test, "${test}c" }
undef $/;
my @tests = split /\n###+\n/, <DATA>;
@@ -22,11 +26,13 @@ for (@tests) {
my ($script, $expect) = split />>>+\n/;
$expect =~ s/\n$//;
open T, ">$test"; print T $script; close T;
- $got = run_perl(switches => [ "-MO=Bytecode,-H,-o$test" ],
- stderr => 1,
+ $got = run_perl(switches => [ "-MO=Bytecode,-H,-o${test}c" ],
+ verbose => 0, # for debugging
+ stderr => 1, # to capture the "bytecode.pl syntax ok"
progfile => $test);
unless ($?) {
- $got = run_perl(progfile => $test);
+ 1 while unlink($test); # nuke the .pl
+ $got = run_perl(progfile => "${test}c"); # run the .plc
unless ($?) {
if ($got =~ /^$expect$/) {
print "ok $cnt\n";