Change 14084 by jhi@alpha on 2002/01/04 22:57:03

        Subject: Re: [PATCH op.c] Bad \[...] prototype checking
        From: Rafael Garcia-Suarez <[EMAIL PROTECTED]>
        Date: Sat, 5 Jan 2002 00:31:12 +0100
        Message-ID: <20020105003112.E1850@rafael>              

Affected files ...

.... //depot/perl/t/comp/proto.t#34 edit

Differences ...

==== //depot/perl/t/comp/proto.t#34 (xtext) ====
Index: perl/t/comp/proto.t
--- perl/t/comp/proto.t.~1~     Fri Jan  4 16:00:06 2002
+++ perl/t/comp/proto.t Fri Jan  4 16:00:06 2002
@@ -16,7 +16,7 @@
 
 use strict;
 
-print "1..135\n";
+print "1..140\n";
 
 my $i = 1;
 
@@ -526,6 +526,23 @@
     print "ok ", $i++, "\n";
     print "not " unless myref(*myglob)  =~ /^GLOB\(/;
     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 "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 "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 "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 "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 "ok ", $i++, "\n";
 }
 
 # check that obviously bad prototypes are getting warnings
End of Patch.

Reply via email to