Split all the tests for ops that can return undef for defined args
[p5sagit/p5-mst-13.2.git] / t / lib / warnings / regcomp
index ceca441..f85aa44 100644 (file)
@@ -2,10 +2,6 @@
 
   Quantifier unexpected on zero-length expression [S_study_chunk] 
 
-  (?p{}) is deprecated - use (??{})  [S_reg]
-    $a =~ /(?p{'x'})/ ;
-    
-
   Useless (%s%c) - %suse /%c modifier [S_reg] 
   Useless (%sc) - %suse /gc modifier [S_reg] 
 
@@ -20,7 +16,7 @@
   /%.127s/: Unrecognized escape \\%c passed through    [S_regatom] 
        $x = '\m' ; /$x/
 
-  POSIX syntax [%c %c] is reserved for future extensions [S_checkposixcc] 
+  POSIX syntax [%c %c] belongs inside character classes        [S_checkposixcc] 
 
 
   Character class [:%.*s:] unknown     [S_regpposixcc]
@@ -47,15 +43,6 @@ $a =~ /(?=a)*/ ;
 EXPECT
 (?=a)* matches null string many times in regex; marked by <-- HERE in m/(?=a)* <-- HERE / at - line 4.
 ########
-# regcomp.c [S_study_chunk]
-use warnings 'regexp' ;
-$_ = "" ;
-/(?=a)?/;
-no warnings 'regexp' ;
-/(?=a)?/;
-EXPECT
-Quantifier unexpected on zero-length expression in regex; marked by <-- HERE in m/(?=a)? <-- HERE / at - line 4.
-########
 # regcomp.c [S_regatom]
 $x = '\m' ;
 use warnings 'regexp' ;
@@ -65,21 +52,29 @@ $a =~ /a$x/ ;
 EXPECT
 Unrecognized escape \m passed through in regex; marked by <-- HERE in m/a\m <-- HERE / at - line 4.
 ########
+# regcomp.c [S_regatom]
+# The \q should warn, the \_ should NOT warn.
+use warnings 'regexp';
+"foo" =~ /\q/;
+"bar" =~ /\_/;
+no warnings 'regexp';
+"foo" =~ /\q/;
+"bar" =~ /\_/;
+EXPECT
+Unrecognized escape \q passed through in regex; marked by <-- HERE in m/\q <-- HERE / at - line 4.
+########
 # regcomp.c [S_regpposixcc S_checkposixcc]
 #
 use warnings 'regexp' ;
 $_ = "" ;
 /[:alpha:]/;
 /[:zog:]/;
-/[[:zog:]]/;
 no warnings 'regexp' ;
 /[:alpha:]/;
 /[:zog:]/;
-/[[:zog:]]/;
 EXPECT
 POSIX syntax [: :] belongs inside character classes in regex; marked by <-- HERE in m/[:alpha:] <-- HERE / at - line 5.
 POSIX syntax [: :] belongs inside character classes in regex; marked by <-- HERE in m/[:zog:] <-- HERE / at - line 6.
-POSIX class [:zog:] unknown in regex; marked by <-- HERE in m/[[:zog:] <-- HERE ]/
 ########
 # regcomp.c [S_checkposixcc]
 #
@@ -90,17 +85,7 @@ no warnings 'regexp' ;
 /[.zog.]/;
 EXPECT
 POSIX syntax [. .] belongs inside character classes in regex; marked by <-- HERE in m/[.zog.] <-- HERE / at - line 5.
-POSIX syntax [. .] is reserved for future extensions in regex; marked by <-- HERE in m/[.zog.] <-- HERE /
-########
-# regcomp.c [S_checkposixcc]
-#
-use warnings 'regexp' ;
-$_ = "" ;
-/[[.zog.]]/;
-no warnings 'regexp' ;
-/[[.zog.]]/;
-EXPECT
-POSIX syntax [. .] is reserved for future extensions in regex; marked by <-- HERE in m/[[.zog.] <-- HERE ]/
+POSIX syntax [. .] is reserved for future extensions in regex; marked by <-- HERE in m/[.zog.] <-- HERE / at - line 5.
 ########
 # regcomp.c [S_regclass]
 $_ = "";
@@ -182,21 +167,6 @@ EXPECT
 Unrecognized escape \z in character class passed through in regex; marked by <-- HERE in m/[a\z <-- HERE b]/ at - line 3.
 
 ########
-# regcomp.c [S_study_chunk]
-use warnings 'deprecated' ;
-$a = "xx" ;
-$a =~ /(?p{'x'})/ ;
-no warnings ;
-use warnings 'regexp' ;
-$a =~ /(?p{'x'})/ ;
-use warnings;
-no warnings 'deprecated' ;
-no warnings 'regexp' ;
-$a =~ /(?p{'x'})/ ;
-EXPECT
-(?p{}) is deprecated - use (??{}) in regex; marked by <-- HERE in m/(?p <-- HERE {'x'})/ at - line 4.
-(?p{}) is deprecated - use (??{}) in regex; marked by <-- HERE in m/(?p <-- HERE {'x'})/ at - line 7.
-########
 # regcomp.c [S_reg]
 use warnings 'regexp' ;
 $a = qr/(?c)/;