summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-05-03 12:15:45 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-05-03 12:15:45 +0000
commit491873e5975978ffc50c5af79581657c3f0e3068 (patch)
treed2c27afeaac941d5f317d8dfb19b25914919415b /t
parent87f4a7b253858acc72094bac97b22c3f9126c030 (diff)
downloadperl-491873e5975978ffc50c5af79581657c3f0e3068.tar.gz
mkdir without arguments now defaults to $_
p4raw-id: //depot/perl@24378
Diffstat (limited to 't')
-rw-r--r--t/op/cproto.t2
-rwxr-xr-xt/op/mkdir.t22
2 files changed, 21 insertions, 3 deletions
diff --git a/t/op/cproto.t b/t/op/cproto.t
index 8b6bad147c..a50a85192b 100644
--- a/t/op/cproto.t
+++ b/t/op/cproto.t
@@ -137,7 +137,7 @@ lstat (*)
lt ($$)
m undef
map undef
-mkdir ($;$)
+mkdir ()
msgctl ($$$)
msgget ($$)
msgrcv ($$$$$)
diff --git a/t/op/mkdir.t b/t/op/mkdir.t
index 6198000642..65a7d3a4ed 100755
--- a/t/op/mkdir.t
+++ b/t/op/mkdir.t
@@ -1,4 +1,4 @@
-#!./perl
+#!./perl -w
BEGIN {
chdir 't' if -d 't';
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 13;
+plan tests => 22;
use File::Path;
rmtree('blurfl');
@@ -34,3 +34,21 @@ SKIP: {
ok(rmdir('blurfl///'));
ok(!-d 'blurfl');
}
+
+# test default argument
+
+$_ = 'blurfl';
+ok(mkdir);
+ok(-d);
+ok(rmdir);
+ok(!-d);
+$_ = 'lfrulb';
+
+{
+ my $_ = 'blurfl';
+ ok(mkdir);
+ ok(-d);
+ ok(-d 'blurfl');
+ ok(!-d 'lfrulb');
+ ok(rmdir);
+}