summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2003-10-30 22:01:35 +0000
committerNicholas Clark <nick@ccl4.org>2003-10-30 22:18:53 +0000
commit2d981f2701e9f92843f194f91d9b984eefa4793e (patch)
treed300f345d05dd8b67c79e737892eb0b9fbe5cc85 /t
parentd8012aafdb274a91ce4d5cb2e6453548a3aa2dd5 (diff)
downloadperl-2d981f2701e9f92843f194f91d9b984eefa4793e.tar.gz
Fix for the orange lion bug - aka empty sub bug
Message-Id: <A10EEA90-0B24-11D8-93CD-000A95A2734C@nanisky.com> p4raw-id: //depot/perl@21582
Diffstat (limited to 't')
-rw-r--r--t/op/sub.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/op/sub.t b/t/op/sub.t
new file mode 100644
index 0000000000..b76d34cb72
--- /dev/null
+++ b/t/op/sub.t
@@ -0,0 +1,19 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require Config; import Config;
+}
+
+use Test::More tests => 4;
+
+sub empty_sub {}
+
+is(empty_sub,undef,"Is empty");
+is(empty_sub(1,2,3),undef,"Is still empty");
+@test = empty_sub();
+is(scalar(@test), 0, 'Didnt return anything');
+@test = empty_sub(1,2,3);
+is(scalar(@test), 0, 'Didnt return anything');
+