Remove duplicately applied patch shards.
[p5sagit/p5-mst-13.2.git] / t / lib / st-forgive.t
index fd5204f..822013b 100644 (file)
@@ -29,6 +29,7 @@ sub BEGIN {
 }
 
 use Storable qw(store retrieve);
+use File::Spec;
 
 print "1..8\n";
 
@@ -42,8 +43,10 @@ print (($@ ne '')?"ok $test\n":"not ok $test\n"); $test++;
 
 $Storable::forgive_me=1;
 
+my $devnull = File::Spec->devnull;
+
 open(SAVEERR, ">&STDERR");
-open(STDERR, ">/dev/null") or 
+open(STDERR, ">$devnull") or 
   ( print SAVEERR "Unable to redirect STDERR: $!\n" and exit(1) );
 
 eval {$result = store ($bad , 'store')};
@@ -60,4 +63,4 @@ print (($ret->[2] eq 'bar')?"ok $test\n":"not ok $test\n"); $test++;
 print ((ref $ret->[1] eq 'SCALAR')?"ok $test\n":"not ok $test\n"); $test++;
 
 
-END { unlink 'store' }
+END { 1 while unlink 'store' }