summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-18 14:41:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-18 14:41:26 +0000
commit5df4b323ce05ce1c7f9261685804fb4bc7aadbce (patch)
tree31d33e545d24a776c8cbcfedc74ae4e201a89b5c /t/comp
parent859a4967b34787587c974f8bf025c16c1346ea14 (diff)
downloadperl-5df4b323ce05ce1c7f9261685804fb4bc7aadbce.tar.gz
Test for the interaction between ; and _ in prototypes
p4raw-id: //depot/perl@29039
Diffstat (limited to 't/comp')
-rw-r--r--t/comp/uproto.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/comp/uproto.t b/t/comp/uproto.t
index d09461fa89..f5472d5280 100644
--- a/t/comp/uproto.t
+++ b/t/comp/uproto.t
@@ -6,7 +6,7 @@ BEGIN {
require "./test.pl";
}
-plan(tests => 30);
+plan(tests => 32);
sub f($$_) { my $x = shift; is("@_", $x) }
@@ -63,3 +63,6 @@ like( $@, qr/Malformed prototype for main::wrong1/, 'wrong1' );
eval q{ sub wrong2 ($__); wrong2(1,2) };
like( $@, qr/Malformed prototype for main::wrong2/, 'wrong2' );
+
+sub opt ($;_) { is($_[0], "seen"); ok(!defined $_[1], "; has precedence over _") }
+opt("seen");