Move the $data and $result munging into the test preparation loop.
[p5sagit/p5-mst-13.2.git] / t / op / stat.t
index 6eb5c9a..b1f7a15 100755 (executable)
@@ -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');