Change 18577 by rgs@rgs-home on 2003/01/23 20:46:00
Subject: [PATCH] move pad.c warnings to different test file
From: Dave Mitchell <[EMAIL PROTECTED]>
Date: Thu, 23 Jan 2003 20:56:47 +0000
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/MANIFEST#967 edit
... //depot/perl/t/lib/warnings/op#17 edit
... //depot/perl/t/lib/warnings/pad#1 add
Differences ...
==== //depot/perl/MANIFEST#967 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#966~18496~ Thu Jan 16 12:36:23 2003
+++ perl/MANIFEST Thu Jan 23 12:46:00 2003
@@ -2500,6 +2500,7 @@
t/lib/warnings/malloc Tests for malloc.c for warnings.t
t/lib/warnings/mg Tests for mg.c for warnings.t
t/lib/warnings/op Tests for op.c for warnings.t
+t/lib/warnings/pad Tests for pad.c for warnings.t
t/lib/warnings/perl Tests for perl.c for warnings.t
t/lib/warnings/perlio Tests for perlio.c for warnings.t
t/lib/warnings/perly Tests for perly.y for warnings.t
==== //depot/perl/t/lib/warnings/op#17 (text) ====
Index: perl/t/lib/warnings/op
--- perl/t/lib/warnings/op#16~18020~ Wed Oct 16 11:43:21 2002
+++ perl/t/lib/warnings/op Thu Jan 23 12:46:00 2003
@@ -1,25 +1,5 @@
op.c AOK
- "my" variable %s masks earlier declaration in same scope
- my $x;
- my $x ;
-
- Variable "%s" may be unavailable
- sub x {
- my $x;
- sub y {
- $x
- }
- }
-
- Variable "%s" will not stay shared
- sub x {
- my $x;
- sub y {
- sub { $x }
- }
- }
-
Found = in conditional, should be ==
1 if $a = 1 ;
@@ -118,79 +98,11 @@
sub fred() ;
sub fred($) {}
- %s never introduced [pad_leavemy] TODO
Runaway prototype [newSUB] TODO
oops: oopsAV [oopsAV] TODO
oops: oopsHV [oopsHV] TODO
__END__
-# op.c
-use warnings 'misc' ;
-my $x ;
-my $x ;
-my $y = my $y ;
-no warnings 'misc' ;
-my $x ;
-my $y ;
-EXPECT
-"my" variable $x masks earlier declaration in same scope at - line 4.
-"my" variable $y masks earlier declaration in same statement at - line 5.
-########
-# op.c
-use warnings 'closure' ;
-sub x {
- my $x;
- sub y {
- $x
- }
- }
-EXPECT
-Variable "$x" will not stay shared at - line 7.
-########
-# op.c
-no warnings 'closure' ;
-sub x {
- my $x;
- sub y {
- $x
- }
- }
-EXPECT
-
-########
-# op.c
-use warnings 'closure' ;
-sub x {
- our $x;
- sub y {
- $x
- }
- }
-EXPECT
-
-########
-# op.c
-use warnings 'closure' ;
-sub x {
- my $x;
- sub y {
- sub { $x }
- }
- }
-EXPECT
-Variable "$x" may be unavailable at - line 6.
-########
-# op.c
-no warnings 'closure' ;
-sub x {
- my $x;
- sub y {
- sub { $x }
- }
- }
-EXPECT
-
-########
# op.c
use warnings 'syntax' ;
1 if $a = 1 ;
==== //depot/perl/t/lib/warnings/pad#1 (text) ====
Index: perl/t/lib/warnings/pad
--- /dev/null Tue May 5 13:32:27 1998
+++ perl/t/lib/warnings/pad Thu Jan 23 12:46:00 2003
@@ -0,0 +1,105 @@
+ pad.c AOK
+
+ "my" variable %s masks earlier declaration in same scope
+ my $x;
+ my $x ;
+
+ Variable "%s" may be unavailable
+ sub x {
+ my $x;
+ sub y {
+ $x
+ }
+ }
+
+ Variable "%s" will not stay shared
+ sub x {
+ my $x;
+ sub y {
+ sub { $x }
+ }
+ }
+ "our" variable %s redeclared (Did you mean "local" instead of "our"?)
+ our $x;
+ {
+ our $x;
+ }
+
+ %s never introduced [pad_leavemy] TODO
+
+__END__
+# pad.c
+use warnings 'misc' ;
+my $x ;
+my $x ;
+my $y = my $y ;
+no warnings 'misc' ;
+my $x ;
+my $y ;
+EXPECT
+"my" variable $x masks earlier declaration in same scope at - line 4.
+"my" variable $y masks earlier declaration in same statement at - line 5.
+########
+# pad.c
+use warnings 'closure' ;
+sub x {
+ my $x;
+ sub y {
+ $x
+ }
+ }
+EXPECT
+Variable "$x" will not stay shared at - line 7.
+########
+# pad.c
+no warnings 'closure' ;
+sub x {
+ my $x;
+ sub y {
+ $x
+ }
+ }
+EXPECT
+
+########
+# pad.c
+use warnings 'closure' ;
+sub x {
+ our $x;
+ sub y {
+ $x
+ }
+ }
+EXPECT
+
+########
+# pad.c
+use warnings 'closure' ;
+sub x {
+ my $x;
+ sub y {
+ sub { $x }
+ }
+ }
+EXPECT
+Variable "$x" may be unavailable at - line 6.
+########
+# pad.c
+no warnings 'closure' ;
+sub x {
+ my $x;
+ sub y {
+ sub { $x }
+ }
+ }
+EXPECT
+
+########
+use warnings 'misc' ;
+our $x;
+{
+ our $x;
+}
+EXPECT
+"our" variable $x redeclared at - line 4.
+ (Did you mean "local" instead of "our"?)
End of Patch.