From e7d3eb55e8d38c7823883a2830dcecfddd108336 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 30 Oct 2008 11:34:05 +0000 Subject: [PATCH] Add a test for bug #60214 p4raw-id: //depot/perl@34661 --- t/op/filetest.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/op/filetest.t b/t/op/filetest.t index 231242b..97ce3f9 100755 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -10,7 +10,7 @@ BEGIN { } use Config; -plan(tests => 24); +plan(tests => 28); ok( -d 'op' ); ok( -f 'TEST' ); @@ -79,6 +79,15 @@ ok( -x -d -x 'op' ); ok( (-s -f 'TEST' > 1), "-s returns real size" ); ok( -f -s 'TEST' == 1 ); +# now with an empty file +open my $fh, ">", "foo"; +close $fh; +ok( -f "foo" ); +is( -s "foo", 0 ); +is( -f -s "foo", 0 ); +is( -s -f "foo", 0 ); +unlink "foo"; + # test that _ is a bareword after filetest operators -f 'TEST'; -- 1.8.3.1