diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-12-13 17:20:44 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-12-14 16:59:53 +0000 |
commit | 80ed94815e0438a29d0ed646ff1c528d910e8a2d (patch) | |
tree | 4f18b4de726c2394b0ebf1938e01061adcf68707 | |
parent | 3d336648fb8d0ef0e9f30c671a256cbab6ba5d5a (diff) | |
download | perl-80ed94815e0438a29d0ed646ff1c528d910e8a2d.tar.gz |
Refactor syslfs.t and lfs.t to call bye() directly from explain() when skipping.
This will make it easier to refactoring to use Test::More/test.pl
-rw-r--r-- | ext/Fcntl/t/syslfs.t | 8 | ||||
-rw-r--r-- | t/op/lfs.t | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ext/Fcntl/t/syslfs.t b/ext/Fcntl/t/syslfs.t index 244ff60368..c6252cc934 100644 --- a/ext/Fcntl/t/syslfs.t +++ b/ext/Fcntl/t/syslfs.t @@ -52,7 +52,10 @@ sub explain { # EOM } - print "1..0 # Skip: @_\n" if @_; + if (@_) { + print "1..0 # Skip: @_\n"; + bye(); + } } $| = 1; @@ -144,7 +147,6 @@ unless (! $r && defined $sysseek && $sysseek == 5_000_000_000) { $sysseek = 'undef' unless defined $sysseek; explain("seeking past 2GB failed: ", $r ? 'signal '.($r & 0x7f) : "$! (sysseek returned $sysseek)"); - bye(); } # The syswrite will fail if there are are filesize limitations (process or fs). @@ -162,7 +164,6 @@ unless($syswrite && $close) { } else { explain("error: $!"); } - bye(); } @s = stat($big0); @@ -171,7 +172,6 @@ print "# @s\n"; unless ($s[7] == 5_000_000_003) { explain("kernel/fs not configured to use large files?"); - bye(); } sub fail { diff --git a/t/op/lfs.t b/t/op/lfs.t index 7afdddf07c..67e4f64aca 100644 --- a/t/op/lfs.t +++ b/t/op/lfs.t @@ -53,7 +53,10 @@ sub explain { # EOM } - print "1..0 # Skip: @_\n" if @_; + if(@_) { + print "1..0 # Skip: @_\n"; + bye(); + } } $| = 1; @@ -146,7 +149,6 @@ binmode BIG; if ($r or not seek(BIG, 5_000_000_000, SEEK_SET)) { my $err = $r ? 'signal '.($r & 0x7f) : $!; explain("seeking past 2GB failed: $err"); - bye(); } # Either the print or (more likely, thanks to buffering) the close will @@ -163,7 +165,6 @@ unless ($print && $close) { } else { explain("error: $!"); } - bye(); } @s = stat($big0); @@ -172,7 +173,6 @@ print "# @s\n"; unless ($s[7] == 5_000_000_003) { explain("kernel/fs not configured to use large files?"); - bye(); } sub fail { |