(Retracted by #8395.)
[p5sagit/p5-mst-13.2.git] / t / lib / st-forgive.t
index a709ce0..5881098 100644 (file)
@@ -1,34 +1,36 @@
 #!./perl
 
-# $Id: forgive.t,v 0.7.1.1 2000/08/03 22:04:45 ram Exp $
+# $Id: forgive.t,v 1.0.1.1 2000/09/01 19:40:42 ram Exp $
 #
 #  Copyright (c) 1995-2000, Raphael Manfredi
 #  
-#  You may redistribute only under the terms of the Artistic License,
-#  as specified in the README file that comes with the distribution.
+#  You may redistribute only under the same terms as Perl 5, as specified
+#  in the README file that comes with the distribution.
 #
 # Original Author: Ulrich Pfeifer
 # (C) Copyright 1997, Universitat Dortmund, all rights reserved.
 #
 # $Log: forgive.t,v $
-# Revision 0.7.1.1  2000/08/03 22:04:45  ram
-# Baseline for second beta release.
+# Revision 1.0.1.1  2000/09/01 19:40:42  ram
+# Baseline for first official release.
 #
-# Revision 0.7  2000/08/03 22:04:45  ram
-# Baseline for second beta release.
+# Revision 1.0  2000/09/01 19:40:41  ram
+# Baseline for first official release.
 #
 
 sub BEGIN {
     chdir('t') if -d 't';
+    @INC = '.'; 
+    push @INC, '../lib';
     require Config; import Config;
     if ($Config{'extensions'} !~ /\bStorable\b/) {
         print "1..0 # Skip: Storable was not built\n";
         exit 0;
     }
-    unshift @INC, '../lib';
 }
 
 use Storable qw(store retrieve);
+use File::Spec;
 
 print "1..8\n";
 
@@ -42,8 +44,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 +64,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' }