summaryrefslogtreecommitdiff
path: root/t/pragma/warn
diff options
context:
space:
mode:
authorJeffrey Friedl <jfriedl@regex.info>2000-07-16 10:55:29 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2000-07-26 04:31:01 +0000
commit3802429d267c8d589218258636c61462cb33dd22 (patch)
tree9470fbcdfc94c0a188ef166ba1382489a8d7e242 /t/pragma/warn
parentf3b76584ef7773843ba39a11b8bd91238af59f12 (diff)
downloadperl-3802429d267c8d589218258636c61462cb33dd22.tar.gz
Make the unimplemented POSIX regex features [[.cc.]] and [[=c=]]
to be fatal errors (instead of by default ignoring them, and ignoring with a bug: even though -w gave an error, the opening [ was left in) Reported in: Subject: [ID 20000716.024] [=cc=] / [:blank:] Message-Id: <200007170055.RAA23528@fummy.dsl.yahoo.com> p4raw-id: //depot/perl@6439
Diffstat (limited to 't/pragma/warn')
-rw-r--r--t/pragma/warn/regcomp47
1 files changed, 24 insertions, 23 deletions
diff --git a/t/pragma/warn/regcomp b/t/pragma/warn/regcomp
index 5d0c291ea0..ef87b7fbb4 100644
--- a/t/pragma/warn/regcomp
+++ b/t/pragma/warn/regcomp
@@ -11,10 +11,6 @@
Character class [:%.*s:] unknown [S_regpposixcc]
- Character class syntax [. .] is reserved for future extensions [S_regpposixcc]
-
- Character class syntax [= =] is reserved for future extensions [S_checkposixcc]
-
Character class syntax [%c %c] belongs inside character classes [S_checkposixcc]
/%.127s/: false [] range \"%*.*s\" in regexp [S_regclass]
@@ -58,32 +54,37 @@ BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 }
use warnings 'regexp' ;
$_ = "" ;
/[:alpha:]/;
-/[.bar.]/;
-/[=zog=]/;
-/[[:alpha:]]/;
-/[[.foo.]]/;
-/[[=bar=]]/;
/[:zog:]/;
/[[:zog:]]/;
no warnings 'regexp' ;
/[:alpha:]/;
-/[.foo.]/;
-/[=bar=]/;
-/[[:alpha:]]/;
-/[[.foo.]]/;
-/[[=bar=]]/;
-/[[:zog:]]/;
/[:zog:]/;
+/[[:zog:]]/;
EXPECT
Character class syntax [: :] belongs inside character classes at - line 5.
-Character class syntax [. .] belongs inside character classes at - line 6.
-Character class syntax [. .] is reserved for future extensions at - line 6.
-Character class syntax [= =] belongs inside character classes at - line 7.
-Character class syntax [= =] is reserved for future extensions at - line 7.
-Character class syntax [. .] is reserved for future extensions at - line 9.
-Character class syntax [= =] is reserved for future extensions at - line 10.
-Character class syntax [: :] belongs inside character classes at - line 11.
-Character class [:zog:] unknown at - line 12.
+Character class syntax [: :] belongs inside character classes at - line 6.
+Character class [:zog:] unknown at - line 7.
+########
+# regcomp.c [S_checkposixcc]
+BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 }
+use warnings 'regexp' ;
+$_ = "" ;
+/[.zog.]/;
+no warnings 'regexp' ;
+/[.zog.]/;
+EXPECT
+Character class syntax [. .] belongs inside character classes at - line 5.
+Character class syntax [. .] is reserved for future extensions at - line 5.
+########
+# regcomp.c [S_checkposixcc]
+BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 }
+use warnings 'regexp' ;
+$_ = "" ;
+/[[.zog.]]/;
+no warnings 'regexp' ;
+/[[.zog.]]/;
+EXPECT
+Character class syntax [. .] is reserved for future extensions at - line 5.
########
# regcomp.c [S_regclass]
$_ = "";