From: Jarkko Hietaniemi Date: Sat, 21 Oct 2000 14:35:57 +0000 (+0000) Subject: Add a testcase for #7389. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ace291746caf9bc3bb2dd418c18376af9fafdba7;p=p5sagit%2Fp5-mst-13.2.git Add a testcase for #7389. p4raw-id: //depot/perl@7390 --- diff --git a/t/pragma/warn/op b/t/pragma/warn/op index de326f8..0163d76 100644 --- a/t/pragma/warn/op +++ b/t/pragma/warn/op @@ -71,6 +71,13 @@ Constant subroutine %s redefined sub fred() {1;} sub fred() {1;} + Constant subroutine %s redefined + sub fred() {1;} sub fred() {1;} + + Prototype mismatch: sub main::foo () vs none + Constant subroutine foo redefined + sub foo () {1} sub foo {1} + Format FRED redefined at /tmp/x line 5. format FRED = . @@ -730,6 +737,14 @@ EXPECT Constant subroutine fred redefined at - line 4. ######## # op.c +use warnings; +sub foo () {1} +sub foo {1} +EXPECT +Prototype mismatch: sub main::foo () vs none at - line 4. +Constant subroutine foo redefined at - line 4. +######## +# op.c use warnings 'redefine' ; format FRED = .