From: Michael G. Schwern Date: Mon, 27 Aug 2001 21:24:44 +0000 (-0400) Subject: Re: [PATCH pod/perlhack.pod t/op/pack.t] Fixing bad testing advice X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c274e827ea60addeb279fce8a64fd0960c08f01f;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH pod/perlhack.pod t/op/pack.t] Fixing bad testing advice Message-Id: <20010827212444.F12582@blackrider> p4raw-id: //depot/perl@11768 --- diff --git a/pod/perlhack.pod b/pod/perlhack.pod index acaf43f..43e04d4 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -1482,8 +1482,13 @@ write one easily. my $test = 1; sub ok { my($ok) = @_; - print "not " unless $ok; - print "ok $test\n"; + + # You have to do it this way or VMS will get confused. + my $out = ''; + $out = "not " unless $ok; + $out .= "ok $test\n"; + print $out; + $test++; return $ok; } diff --git a/t/op/pack.t b/t/op/pack.t index 02247df..8256887 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -12,12 +12,18 @@ $Is_EBCDIC = (defined $Config{ebcdic} && $Config{ebcdic} eq 'define'); my $test = 1; sub ok { my($ok) = @_; - print "not " unless $ok; - print "ok $test\n"; + + # You have to do it this way or VMS will get confused. + my $out = ''; + $out = "not " unless $ok; + $out .= "ok $test\n"; + print $out; + $test++; return $ok; } + print "1..161\n"; # Note: All test numbers in comments are off by 1 after the comment below..