Tests for #7487.
authorAndreas König <a.koenig@mind.de>
Sun, 29 Oct 2000 19:37:09 +0000 (20:37 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 29 Oct 2000 21:07:47 +0000 (21:07 +0000)
Subject: Re: [ID 20001029.002] Not OK: perl v5.7.0 +DEVEL7462 on i686-linux 2.2.16a (UNINSTALLED)
Message-ID: <m34s1vsdd6.fsf@ak-71.mind.de>

p4raw-id: //depot/perl@7488

t/comp/proto.t

index f9731ee..9ac1e0f 100755 (executable)
@@ -16,7 +16,7 @@ BEGIN {
 
 use strict;
 
-print "1..110\n";
+print "1..122\n";
 
 my $i = 1;
 
@@ -485,3 +485,12 @@ sub sreftest (\$$) {
     sreftest($helem{$i}, $i++);
     sreftest $aelem[0], $i++;
 }
+
+# test prototypes when they are evaled and there is a syntax error
+for my $p ( "", qw{ () ($) ($@) ($%) ($;$) (&) (&\@) (&@) (%) (\%) (\@) } ) {
+  no warnings 'redefine';
+  my $eval = "sub evaled_subroutine $p { &void *; }";
+  eval $eval;
+  print "# eval[$eval]\nnot " unless $@ && $@ =~ /syntax error/;
+  print "ok ", $i++, "\n";
+}