In Fcntl's syslfs.t and t/op/lfs.t, eliminate zap().
authorNicholas Clark <nick@ccl4.org>
Tue, 14 Dec 2010 15:43:02 +0000 (15:43 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 14 Dec 2010 16:59:53 +0000 (16:59 +0000)
Now that we're using tempfiles, it no longer contains code to unlink the test
files, only a close. Inline the C<close BIG> into bye(), and remove the other
call to zap(), which was immediately after an explicit close of BIG.

ext/Fcntl/t/syslfs.t
t/op/lfs.t

index c6252cc..e5996b3 100644 (file)
@@ -22,12 +22,8 @@ our $fail;
 (undef, my $big1) = tempfile(UNLINK => 1);
 (undef, my $big2) = tempfile(UNLINK => 1);
 
-sub zap {
-    close(BIG);
-}
-
 sub bye {
-    zap(); 
+    close(BIG);
     exit(0);
 }
 
@@ -108,8 +104,6 @@ my @s2 = stat($big2);
 
 print "# s2 = @s2\n";
 
-zap();
-
 unless ($s1[7] == 1_000_003 && $s2[7] == 2_000_003 &&
        $s1[11] == $s2[11] && $s1[12] == $s2[12] &&
        $s1[12] > 0) {
index 67e4f64..cf7a364 100644 (file)
@@ -23,12 +23,8 @@ my $big0 = tempfile();
 my $big1 = tempfile();
 my $big2 = tempfile();
 
-sub zap {
-    close(BIG);
-}
-
 sub bye {
-    zap(); 
+    close(BIG);
     exit(0);
 }
 
@@ -119,8 +115,6 @@ my @s2 = stat($big2);
 
 print "# s2 = @s2\n";
 
-zap();
-
 unless ($s1[7] == 1_000_003 && $s2[7] == 2_000_003 &&
        $s1[11] == $s2[11] && $s1[12] == $s2[12] &&
        $s1[12] > 0) {