develooper Front page | perl.vmsperl | Postings from December 2001

[PATCH lib/vmsish.t] Small test name abuse.

From:
Michael G Schwern
Date:
December 7, 2001 17:03
Subject:
[PATCH lib/vmsish.t] Small test name abuse.
Message ID:
20011208010345.GD642@blackrider
A couple of tests in vmsish.t were misusing the test names, trying to
make it do double duty as diagnostic output.  This resulted in:

ok 23 - (localtime)
\# UTC: 30 43 19 7 11 101 5 340 0
\# VMS: 30 43 19 7 11 101 5 340 0
ok 24 - (gmtime)
\# UTC: 30 43 0 8 11 101 6 341 0
\# VMS: 30 43 0 8 11 101 6 341 0

which caused test.com's rightfully unforgiving test parsing to gag.


With this in place that's it.  *NO MORE EXPECTED FAILURES ON VMS*
Everything from here on is either a real bug or a portability goof.


--- lib/vmsish.t	2001/12/08 00:55:45	1.1
+++ lib/vmsish.t	2001/12/08 00:58:01
@@ -134,13 +134,15 @@
             $utclocal[2] * 3600     + $utclocal[1] * 60 + $utclocal[0];
   $vmsval = $vmslocal[5] * 31536000 + $vmslocal[7] * 86400 +
             $vmslocal[2] * 3600     + $vmslocal[1] * 60 + $vmslocal[0];
-  ok($vmsval - $utcval + $offset <= 10, "(localtime)\n# UTC: @utclocal\n# VMS: @vmslocal");
+  ok($vmsval - $utcval + $offset <= 10, "(localtime)");
+  print "# UTC: @utclocal\n# VMS: @vmslocal\n";
 
   $utcval = $utcgmtime[5] * 31536000 + $utcgmtime[7] * 86400 +
             $utcgmtime[2] * 3600     + $utcgmtime[1] * 60 + $utcgmtime[0];
   $vmsval = $vmsgmtime[5] * 31536000 + $vmsgmtime[7] * 86400 +
             $vmsgmtime[2] * 3600     + $vmsgmtime[1] * 60 + $vmsgmtime[0];
-  ok($vmsval - $utcval + $offset <= 10, "(gmtime)\n# UTC: @utcgmtime\n# VMS: @vmsgmtime");
+  ok($vmsval - $utcval + $offset <= 10, "(gmtime)");
+  print "# UTC: @utcgmtime\n# VMS: @vmsgmtime\n";
 
   ok($vmsmtime - $utcmtime + $offset <= 10,"(stat) UTC: $utcmtime  VMS: $vmsmtime");
 }

-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa@perl.org>	       Kwalitee Is Job One
A tickle of paste
Teases down my sweaty thigh
Oh, plug it again!
	-- ignatz



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About