diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2005-11-01 17:05:38 +0000 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2005-11-02 09:41:25 +0000 |
commit | bda6ed216cf53718fff278193bffd2c4078fb377 (patch) | |
tree | 2f58df7e22ea06050a69bf7ff6f6bfe066578269 /t | |
parent | fc8d54b0ec8f51a3b3106f2c54bd0f1ada739e0e (diff) | |
download | perl-bda6ed216cf53718fff278193bffd2c4078fb377.tar.gz |
RE: [perl #37571] -z FH broken with Borland build
From: "Paul Marquess" <paul.marquess@ntlworld.com>
Message-ID: <003501c5df06$7d63fdb0$0505140a@myopwv.com>
p4raw-id: //depot/perl@25952
Diffstat (limited to 't')
-rwxr-xr-x | t/op/stat.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/op/stat.t b/t/op/stat.t index 6eb5c9a0c4..b1f7a150ef 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -9,7 +9,7 @@ BEGIN { use Config; use File::Spec; -plan tests => 82; +plan tests => 86; my $Perl = which_perl(); @@ -128,6 +128,8 @@ DIAG # truncate and touch $tmpfile. open(F, ">$tmpfile") || DIE("Can't open temp test file: $!"); +ok(-z \*F, '-z on empty filehandle'); +ok(! -s \*F, ' and -s'); close F; ok(-z $tmpfile, '-z on empty file'); @@ -137,6 +139,11 @@ open(F, ">$tmpfile") || DIE("Can't open temp test file: $!"); print F "hi\n"; close F; +open(F, "<$tmpfile") || DIE("Can't open temp test file: $!"); +ok(!-z *F, '-z on empty filehandle'); +ok( -s *F, ' and -s'); +close F; + ok(! -z $tmpfile, '-z on non-empty file'); ok(-s $tmpfile, ' and -s'); |