From: Craig A. Berry Date: Thu, 21 Jun 2001 09:58:52 +0000 (-0500) Subject: fix Deparse.t and write.t for VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4a0c6f3fd7e1afcf00066d61e6733d74c5a3772;p=p5sagit%2Fp5-mst-13.2.git fix Deparse.t and write.t for VMS Message-Id: <5.1.0.14.0.20010620172532.033cdb88@exchi01> p4raw-id: //depot/perl@10815 --- diff --git a/ext/B/Deparse.t b/ext/B/Deparse.t index 048ce31..0979d7e 100644 --- a/ext/B/Deparse.t +++ b/ext/B/Deparse.t @@ -20,7 +20,7 @@ print "1..14\n"; use B::Deparse; my $deparse = B::Deparse->new() or print "not "; my $i=1; -print "ok ", $i++, "\n"; +print "ok " . $i++ . "\n"; # Tell B::Deparse about our ambient pragmas @@ -49,7 +49,7 @@ while () { my $coderef = eval "sub {$input}"; if ($@) { - print "not ok ", $i++, "\n"; + print "not ok " . $i++ . "\n"; print "# $@"; } else { @@ -61,8 +61,7 @@ while () { }; my $ok = ($deparsed =~ /^\{\s*$regex\s*\}$/); - print ($ok ? "ok " : "not ok "); - print $i++, "\n"; + print (($ok ? "ok " : "not ok ") . $i++ . "\n"); if (!$ok) { print "# EXPECTED:\n"; $regex =~ s/^/# /mg; @@ -77,19 +76,19 @@ while () { use constant 'c', 'stuff'; print "not " if (eval "sub ".$deparse->coderef2text(\&c))->() ne 'stuff'; -print "ok ", $i++, "\n"; +print "ok " . $i++ . "\n"; $a = 0; print "not " if "{\n (-1) ** \$a;\n}" ne $deparse->coderef2text(sub{(-1) ** $a }); -print "ok ", $i++, "\n"; +print "ok " . $i++ . "\n"; # XXX ToDo - constsub that returns a reference #use constant cr => ['hello']; #my $string = "sub " . $deparse->coderef2text(\&cr); #my $val = (eval $string)->(); #print "not " if ref($val) ne 'ARRAY' || $val->[0] ne 'hello'; -#print "ok ", $i++, "\n"; +#print "ok " . $i++ . "\n"; my $a; my $Is_VMS = $^O eq 'VMS'; @@ -112,7 +111,7 @@ LINE: while (defined($_ = )) { EOF print "# [$a]\n\# vs expected\n# [$b]\nnot " if $a ne $b; -print "ok ", $i++, "\n"; +print "ok " . $i++ . "\n"; __DATA__ # 1 diff --git a/t/op/write.t b/t/op/write.t index 2830974..7dddbb4 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -273,6 +273,11 @@ else # 12..44: scary format testing from Merijn H. Brand +if ($^O eq 'VMS') { + foreach (12..44) { print "ok $_ # skipped: '|-' and '-|' not supported\n"; } + exit(0); +} + use strict; # Amazed that this hackery can be made strict ... # Just a complete test for format, including top-, left- and bottom marging