summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-10-18 20:57:43 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-10-18 20:57:43 +0000
commit7294df96f6c174861cfdbe3e109c745792c2be60 (patch)
treede94cc8b217405f10011ed73905e1cf78426f23f /t
parent4e577f8b7504b9d2fd0f1c34f337e0edce2c4b9b (diff)
downloadperl-7294df96f6c174861cfdbe3e109c745792c2be60.tar.gz
Force _ to be always a bareword after filetest operators
p4raw-id: //depot/perl@25799
Diffstat (limited to 't')
-rwxr-xr-xt/op/filetest.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/op/filetest.t b/t/op/filetest.t
index 271c4f07ab..231242be86 100755
--- a/t/op/filetest.t
+++ b/t/op/filetest.t
@@ -10,7 +10,7 @@ BEGIN {
}
use Config;
-plan(tests => 22);
+plan(tests => 24);
ok( -d 'op' );
ok( -f 'TEST' );
@@ -78,3 +78,10 @@ ok( ! -f -d 'op' );
ok( -x -d -x 'op' );
ok( (-s -f 'TEST' > 1), "-s returns real size" );
ok( -f -s 'TEST' == 1 );
+
+# test that _ is a bareword after filetest operators
+
+-f 'TEST';
+ok( -f _ );
+sub _ { "this is not a file name" }
+ok( -f _ );