Commit | Line | Data |
---|---|---|
63fbd1cb | 1 | regcomp.c These tests have been moved to t/re/reg_mesg.t |
499333dc | 2 | except for those that explicitly test line numbers |
d8d26cac KW |
3 | and those that don't have a <-- HERE in them, and those that |
4 | die plus have warnings, or otherwise require special handling | |
f9373011 | 5 | |
599cee73 | 6 | __END__ |
dd8ddecf FC |
7 | use warnings 'regexp'; |
8 | $r=qr/(??{ q"\\b+" })/; | |
9 | "a" =~ /a$r/; # warning should come from this line | |
10 | EXPECT | |
11 | \b+ matches null string many times in regex; marked by <-- HERE in m/\b+ <-- HERE / at - line 3. | |
499333dc KW |
12 | ######## |
13 | # regcomp.c | |
14 | use warnings 'digit' ; | |
15 | my $a = qr/\o{1238456}\x{100}/; | |
16 | my $a = qr/[\o{6548321}]\x{100}/; | |
17 | no warnings 'digit' ; | |
18 | my $a = qr/\o{1238456}\x{100}/; | |
19 | my $a = qr/[\o{6548321}]\x{100}/; | |
20 | EXPECT | |
21 | Non-octal character '8'. Resolved as "\o{123}" at - line 3. | |
22 | Non-octal character '8'. Resolved as "\o{654}" at - line 4. | |
23 | ######## | |
ecf931f7 | 24 | # regcomp.c |
20062bee KW |
25 | BEGIN { |
26 | if (ord('A') == 193) { | |
27 | print "SKIPPED\n# Different results on EBCDIC"; | |
28 | exit 0; | |
29 | } | |
30 | } | |
499333dc KW |
31 | use warnings; |
32 | $a = qr/\c,/; | |
33 | $a = qr/[\c,]/; | |
bfdc8cd3 | 34 | no warnings 'syntax', 'deprecated'; |
499333dc KW |
35 | $a = qr/\c,/; |
36 | $a = qr/[\c,]/; | |
37 | EXPECT | |
bfdc8cd3 A |
38 | "\c," is more clearly written simply as "l". This will be a fatal error in Perl 5.28 at - line 9. |
39 | "\c," is more clearly written simply as "l". This will be a fatal error in Perl 5.28 at - line 10. | |
285b5ca0 KW |
40 | ######## |
41 | # This is because currently a different error is output under | |
42 | # use re 'strict', so can't go in reg_mesg.t | |
43 | # NAME perl #126261, error message causes segfault | |
44 | # OPTION fatal | |
45 | qr/abc[\x{df}[.00./i | |
46 | EXPECT | |
47 | Unmatched [ in regex; marked by <-- HERE in m/abc[ <-- HERE \x{df}[.00./ at - line 4. | |
48 | ######## | |
49 | # NAME perl #126261, with 'use utf8' | |
50 | # OPTION fatal | |
51 | use utf8; | |
52 | no warnings 'utf8'; | |
53 | qr/abc[fi[.00./i; | |
54 | EXPECT | |
55 | Unmatched [ in regex; marked by <-- HERE in m/abc[ <-- HERE fi[.00./ at - line 4. | |
46d34d0e KW |
56 | ######## |
57 | # NAME perl qr/(?[[[:word]]])/ XXX Why is 'syntax' lc? | |
58 | # OPTION fatal | |
59 | qr/(?[[[:word]]])/; | |
60 | EXPECT | |
61 | Assuming NOT a POSIX class since there is no terminating ':' in regex; marked by <-- HERE in m/(?[[[:word <-- HERE ]]])/ at - line 2. | |
62 | syntax error in (?[...]) in regex m/(?[[[:word]]])/ at - line 2. | |
63 | ######## | |
64 | # NAME qr/(?[ [[:digit: ])/ | |
65 | # OPTION fatal | |
66 | qr/(?[[[:digit: ])/; | |
67 | EXPECT | |
68 | Assuming NOT a POSIX class since no blanks are allowed in one in regex; marked by <-- HERE in m/(?[[[:digit: ] <-- HERE )/ at - line 2. | |
69 | syntax error in (?[...]) in regex m/(?[[[:digit: ])/ at - line 2. | |
70 | ######## | |
71 | # NAME qr/(?[ [:digit: ])/ | |
72 | # OPTION fatal | |
73 | qr/(?[[:digit: ])/ | |
74 | EXPECT | |
75 | Assuming NOT a POSIX class since no blanks are allowed in one in regex; marked by <-- HERE in m/(?[[:digit: ] <-- HERE )/ at - line 2. | |
76 | syntax error in (?[...]) in regex m/(?[[:digit: ])/ at - line 2. | |
ca76e4e9 KW |
77 | ######## |
78 | # NAME [perl #126141] | |
79 | # OPTION fatal | |
80 | eval {/$_/}, print "$_ ==> ", $@ || "OK!\n" for "]]]]]]]]][\\", "]]]]][\\" | |
81 | EXPECT | |
82 | ]]]]]]]]][\ ==> Unmatched [ in regex; marked by <-- HERE in m/]]]]]]]]][\ <-- HERE / at - line 2. | |
83 | ]]]]][\ ==> Unmatched [ in regex; marked by <-- HERE in m/]]]]][\ <-- HERE / at - line 2. | |
d8d26cac KW |
84 | ######## |
85 | # NAME [perl #123417] | |
86 | use warnings 'regexp'; | |
87 | qr/[\N{}]/; | |
88 | qr/\N{}/; | |
89 | no warnings 'regexp'; | |
90 | qr/[\N{}]/; | |
91 | qr/\N{}/; | |
92 | no warnings 'deprecated'; | |
93 | qr/[\N{}]/; | |
94 | qr/\N{}/; | |
95 | EXPECT | |
db99d38d | 96 | Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 2. |
d8d26cac | 97 | Ignoring zero length \N{} in character class in regex; marked by <-- HERE in m/[\N{} <-- HERE ]/ at - line 2. |
db99d38d A |
98 | Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 3. |
99 | Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 5. | |
100 | Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 6. | |
d8d26cac KW |
101 | ######## |
102 | # NAME [perl #123417] | |
103 | # OPTION fatal | |
104 | use warnings 'regexp'; | |
105 | no warnings 'experimental::re_strict'; | |
106 | use re 'strict'; | |
107 | qr/[\N{}]/; | |
108 | EXPECT | |
db99d38d | 109 | Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 5. |
d8d26cac KW |
110 | Zero length \N{} in regex; marked by <-- HERE in m/[\N{} <-- HERE ]/ at - line 5. |
111 | ######## | |
112 | # NAME [perl #123417] | |
113 | # OPTION fatal | |
114 | use warnings 'regexp'; | |
115 | no warnings 'experimental::re_strict'; | |
116 | use re 'strict'; | |
117 | qr/\N{}/; | |
118 | EXPECT | |
db99d38d | 119 | Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 5. |
d8d26cac | 120 | Zero length \N{} in regex; marked by <-- HERE in m/\N{} <-- HERE / at - line 5. |