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

[PATCH t/op/magic.t] Puut... The TODO... Beck!

Thread Next
From:
Michael G Schwern
Date:
December 7, 2001 14:28
Subject:
[PATCH t/op/magic.t] Puut... The TODO... Beck!
Message ID:
20011207222857.GI23210@blackrider
This reverses 13471, where I thought a TODO test had been fixed.
Turns out the test was written wrong and was hard-wired to always
succeed.

This makes it fail appropriately.  It also shuts up two SYSTEM$ABORT
messages from VMS by applying vmsish qw(hushed).


A note to the VMS folks.  I've got to do so much of this "tell a
subprocess to shut up" that it would be nice if there was a way to
apply hushed to all subprocesses, perhaps via an environment variable?


--- t/op/magic.t	2001/12/07 22:18:01	1.1
+++ t/op/magic.t	2001/12/07 22:22:40
@@ -134,9 +134,9 @@
 }
 
 # $?, $@, $$
-system qq[$PERL -e "exit(0)"];
+system qq[$PERL "-I../lib" -e "use vmsish qw(hushed); exit(0)"];
 ok $? == 0, $?;
-system qq[$PERL -e "exit(1)"];
+system qq[$PERL "-I../lib" -e "use vmsish qw(hushed); exit(1)"];
 ok $? != 0, $?;
 
 eval { die "foo\n" };
@@ -251,9 +251,11 @@
 }
 
 {
-    local $SIG{'__WARN__'} = sub { print "# @_\nnot " };
+    my $ok = 1;
+    my $warn = '';
+    local $SIG{'__WARN__'} = sub { $ok = 0; $warn = join '', @_; };
     $! = undef;
-    ok 1;
+    ok($ok, $warn, $Is_VMS ? "'\$!=undef' does throw a warning" : '');
 }
 
 # test case-insignificance of %ENV (these tests must be enabled only


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa@perl.org>	       Kwalitee Is Job One
If God made anything more guerrila than your breast, I hope he kept it for
your father.

Thread Next


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