From: Andreas König Date: Sun, 29 Oct 2000 19:37:09 +0000 (+0100) Subject: Tests for #7487. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2b35b101bb7661acee93ff085742b0940f0bb9f;p=p5sagit%2Fp5-mst-13.2.git Tests for #7487. Subject: Re: [ID 20001029.002] Not OK: perl v5.7.0 +DEVEL7462 on i686-linux 2.2.16a (UNINSTALLED) Message-ID: p4raw-id: //depot/perl@7488 --- diff --git a/t/comp/proto.t b/t/comp/proto.t index f9731ee..9ac1e0f 100755 --- a/t/comp/proto.t +++ b/t/comp/proto.t @@ -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"; +}