diff options
author | John Tobey <jtobey@john-edwin-tobey.org> | 2000-10-22 00:04:12 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-22 18:24:10 +0000 |
commit | 08f31b3d3711053ee5547c6a55c4bef4c4a8075d (patch) | |
tree | 0bd8caf735ec49e894a3feee8da3d4f2c3983eaa /t/comp | |
parent | e6197cabf1bf43625f8aa8a80559d7b5bf95f2cf (diff) | |
download | perl-08f31b3d3711053ee5547c6a55c4bef4c4a8075d.tar.gz |
Move the #7390 test from warn/op to comp/redef.
Subject: Re: Creating const subs for constants.
Message-Id: <m13nG72-000FObC@feynman.localnet>
p4raw-id: //depot/perl@7400
Diffstat (limited to 't/comp')
-rwxr-xr-x | t/comp/redef.t | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/t/comp/redef.t b/t/comp/redef.t index 07e978bb86..328b44d3c8 100755 --- a/t/comp/redef.t +++ b/t/comp/redef.t @@ -11,7 +11,7 @@ sub ok ($$) { print $_[1] ? "ok " : "not ok ", $_[0], "\n"; } -print "1..18\n"; +print "1..20\n"; my $NEWPROTO = 'Prototype mismatch:'; @@ -72,9 +72,15 @@ sub sub9 ($) { 2 } ok 16, $warn =~ s/$NEWPROTO sub main::sub9 \(\$\Q@) vs ($)\E[^\n]+\n//s; ok 17, $warn =~ s/Subroutine sub9 redefined[^\n]+\n//s; -ok 18, $_ eq ''; +BEGIN { + local $^W = 0; + eval qq(sub sub10 () {1} sub sub10 {1}); +} -# If we got any errors that we were not expecting, then print them -print $_ if length $_; +ok 18, $warn =~ s/$NEWPROTO \Qsub main::sub10 () vs none\E[^\n]+\n//s; +ok 19, $warn =~ s/Constant subroutine sub10 redefined[^\n]+\n//s; +ok 20, $warn eq ''; +# If we got any errors that we were not expecting, then print them +print $warn if length $warn; |