Do no -warn on \_, only on \alpha.
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / toke
index 6ba9c56..b410e19 100644 (file)
@@ -89,10 +89,6 @@ toke.c       AOK
        sub time {} 
        my $a = time()
 
-    \x%.*s will produce malformed UTF-8 character; use \x{%.*s} for that
-        use utf8 ; 
-       $_ = "\xffe"
-
     Unrecognized escape \\%c passed through
         $a = "\m" ;
 
@@ -224,12 +220,12 @@ Reversed *= operator at - line 9.
 Reversed %= operator at - line 10.
 Reversed &= operator at - line 11.
 Reversed .= operator at - line 12.
-syntax error at - line 12, near "=."
 Reversed ^= operator at - line 13.
-syntax error at - line 13, near "=^"
 Reversed |= operator at - line 14.
-syntax error at - line 14, near "=|"
 Reversed <= operator at - line 15.
+syntax error at - line 12, near "=."
+syntax error at - line 13, near "=^"
+syntax error at - line 14, near "=|"
 Unterminated <> operator at - line 15.
 ########
 # toke.c
@@ -294,39 +290,42 @@ Can't use \1 to mean $1 in expression at - line 4.
 # toke.c
 use warnings 'reserved' ;
 $a = abc;
+$a = { def
+
+=> 1 };
 no warnings 'reserved' ;
 $a = abc;
 EXPECT
 Unquoted string "abc" may clash with future reserved word at - line 3.
 ########
 # toke.c
-use warnings 'octal' ;
+use warnings 'chmod' ;
 chmod 3;
-no warnings 'octal' ;
+no warnings 'chmod' ;
 chmod 3;
 EXPECT
 chmod() mode argument is missing initial 0 at - line 3.
 ########
 # toke.c
-use warnings 'syntax' ;
+use warnings 'qw' ;
 @a = qw(a, b, c) ;
-no warnings 'syntax' ;
+no warnings 'qw' ;
 @a = qw(a, b, c) ;
 EXPECT
 Possible attempt to separate words with commas at - line 3.
 ########
 # toke.c
-use warnings 'syntax' ;
+use warnings 'qw' ;
 @a = qw(a b #) ;
-no warnings 'syntax' ;
+no warnings 'qw' ;
 @a = qw(a b #) ;
 EXPECT
 Possible attempt to put comments in qw() list at - line 3.
 ########
 # toke.c
-use warnings 'octal' ;
+use warnings 'umask' ;
 umask 3;
-no warnings 'octal' ;
+no warnings 'umask' ;
 umask 3;
 EXPECT
 umask: argument is missing initial 0 at - line 3.
@@ -417,10 +416,10 @@ Misplaced _ in number at - line 4.
 Misplaced _ in number at - line 4.
 ########
 # toke.c
-use warnings 'unsafe' ;
+use warnings 'bareword' ;
 #line 25 "bar"
 $a = FRED:: ;
-no warnings 'unsafe' ;
+no warnings 'bareword' ;
 #line 25 "bar"
 $a = FRED:: ;
 EXPECT
@@ -438,28 +437,14 @@ Ambiguous call resolved as CORE::time(), qualify as such or use & at - line 4.
 # toke.c
 use warnings ;
 eval <<'EOE';
+#  line 30 "foo"
+warn "yelp";
 {
-#line 30 "foo"
   $_ = " \x{123} " ;
 }
 EOE
 EXPECT
-
-########
-# toke.c
-BEGIN {
-    if (ord("\t") == 5) {
-        print "SKIPPED\n# Ebcdic platforms have different \\x constructs.";
-        exit 0;
-    }
-}
-use warnings 'utf8' ;
-use utf8 ;
-$_ = " \xffe " ;
-no warnings 'utf8' ;
-$_ = " \xffe " ;
-EXPECT
-\xff will produce malformed UTF-8 character; use \x{ff} for that at - line 10.
+yelp at foo line 30.
 ########
 # toke.c
 my $a = rand + 4 ;
@@ -512,9 +497,9 @@ Precedence problem: open FOO should be open(FOO) at - line 2.
 $^W = 0 ;
 open FOO || time;
 {
-    no warnings 'ambiguous' ;
+    no warnings 'precedence' ;
     open FOO || time;
-    use warnings 'ambiguous' ;
+    use warnings 'precedence' ;
     open FOO || time;
 }
 open FOO || time;
@@ -542,10 +527,12 @@ Operator or semicolon missing before *foo at - line 10.
 Ambiguous use of * resolved as operator * at - line 10.
 ########
 # toke.c
-use warnings 'unsafe' ;
+use warnings 'misc' ;
 my $a = "\m" ;
-no warnings 'unsafe' ;
+my $b = "\_" ;
+no warnings 'misc' ;
 $a = "\m" ;
+$b = "\_" ;
 EXPECT
 Unrecognized escape \m passed through at - line 3.
 ########
@@ -600,3 +587,11 @@ EXPECT
 Integer overflow in binary number at - line 5.
 Integer overflow in hexadecimal number at - line 8.
 Integer overflow in octal number at - line 11.
+########
+# toke.c
+use warnings 'ambiguous';
+"@mjd_previously_unused_array";        
+no warnings 'ambiguous';
+"@mjd_previously_unused_array";        
+EXPECT
+Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3.