diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-12-14 15:43:02 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-12-14 16:59:53 +0000 |
commit | 09eb7cfbca20b4071e1b90c66713173d118d1d47 (patch) | |
tree | d4e23337f269c63cde56b781e5c0c70a5d3e6116 | |
parent | 80ed94815e0438a29d0ed646ff1c528d910e8a2d (diff) | |
download | perl-09eb7cfbca20b4071e1b90c66713173d118d1d47.tar.gz |
In Fcntl's syslfs.t and t/op/lfs.t, eliminate zap().
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.
-rw-r--r-- | ext/Fcntl/t/syslfs.t | 8 | ||||
-rw-r--r-- | t/op/lfs.t | 8 |
2 files changed, 2 insertions, 14 deletions
diff --git a/ext/Fcntl/t/syslfs.t b/ext/Fcntl/t/syslfs.t index c6252cc934..e5996b3084 100644 --- a/ext/Fcntl/t/syslfs.t +++ b/ext/Fcntl/t/syslfs.t @@ -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) { diff --git a/t/op/lfs.t b/t/op/lfs.t index 67e4f64aca..cf7a364660 100644 --- a/t/op/lfs.t +++ b/t/op/lfs.t @@ -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) { |