summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-19 09:22:03 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-19 09:22:03 +0000
commita075176614b5ba61bbee8cc5336ddfbd48f21998 (patch)
tree6a178d63dc3aebc41ae313572848e580e04974f6 /t/comp
parent640af7f1c049ab83d4ea0840bc5fa3e1973e991f (diff)
downloadperl-a075176614b5ba61bbee8cc5336ddfbd48f21998.tar.gz
Avoid temporarily writing over the prototype when reporting an error.
(And beef up the relevant tests to really check that it all works). p4raw-id: //depot/perl@27898
Diffstat (limited to 't/comp')
-rwxr-xr-xt/comp/proto.t17
1 files changed, 11 insertions, 6 deletions
diff --git a/t/comp/proto.t b/t/comp/proto.t
index 7f566e226b..1f5ed30fcf 100755
--- a/t/comp/proto.t
+++ b/t/comp/proto.t
@@ -585,20 +585,25 @@ print "ok ", $i++, "\n";
print "ok ", $i++, "\n";
eval q/sub multi1 (\[%@]) { 1 } multi1 $myvar;/;
- print "not " unless $@ =~ /Type of arg 1 to main::multi1 must be one of/;
+ print "not "
+ unless $@ =~ /Type of arg 1 to main::multi1 must be one of \[%\@\] /;
print "ok ", $i++, "\n";
eval q/sub multi2 (\[$*&]) { 1 } multi2 @myarray;/;
- print "not " unless $@ =~ /Type of arg 1 to main::multi2 must be one of/;
+ print "not "
+ unless $@ =~ /Type of arg 1 to main::multi2 must be one of \[\$\*&\] /;
print "ok ", $i++, "\n";
eval q/sub multi3 (\[$@]) { 1 } multi3 %myhash;/;
- print "not " unless $@ =~ /Type of arg 1 to main::multi3 must be one of/;
+ print "not "
+ unless $@ =~ /Type of arg 1 to main::multi3 must be one of \[\$\@\] /;
print "ok ", $i++, "\n";
eval q/sub multi4 ($\[%]) { 1 } multi4 1, &mysub;/;
- print "not " unless $@ =~ /Type of arg 2 to main::multi4 must be one of/;
+ print "not "
+ unless $@ =~ /Type of arg 2 to main::multi4 must be one of \[%\] /;
print "ok ", $i++, "\n";
eval q/sub multi5 (\[$@]$) { 1 } multi5 *myglob;/;
- print "not " unless $@ =~ /Type of arg 1 to main::multi5 must be one of/
- && $@ =~ /Not enough arguments/;
+ print "not "
+ unless $@ =~ /Type of arg 1 to main::multi5 must be one of \[\$\@\] /
+ && $@ =~ /Not enough arguments/;
print "ok ", $i++, "\n";
}