3 This test generates "bad free" warnings when run under
4 PERL_DESTRUCT_LEVEL. This file merely serves as a placeholder
7 Complex regular subexpression recursion limit (%d) exceeded
9 $_ = 'a' x (2**15+1); /^()(a\1)*$/ ;
10 Complex regular subexpression recursion limit (%d) exceeded
12 $_ = 'a' x (2**15+1); /^()(a\1)*?$/ ;
14 (The actual value substituted for %d is masked in the tests so that
15 REG_INFTY configuration variable value does not affect outcome.)
18 print("SKIPPED\n# most systems run into stacksize limits\n"),exit;
19 use warnings 'regexp' ;
20 $SIG{__WARN__} = sub{local ($m) = shift;
21 $m =~ s/\(\d+\)/(*MASKED*)/;
26 # If this test fails with a segmentation violation or similar,
27 # you may have to increase the default stacksize limit in your
28 # shell. You may need superuser privileges.
30 # Under the sh, ksh, zsh:
37 # stacksize 8192 kbytes
38 # % limit stacksize 16000
41 Complex regular subexpression recursion limit (*MASKED*) exceeded at - line 9.
44 print("SKIPPED\n# most systems run into stacksize limits\n"),exit;
45 no warnings 'regexp' ;
46 $SIG{__WARN__} = sub{local ($m) = shift;
47 $m =~ s/\(\d+\)/(*MASKED*)/;
52 # If this test fails with a segmentation violation or similar,
53 # you may have to increase the default stacksize limit in your
54 # shell. You may need superuser privileges.
56 # Under the sh, ksh, zsh:
63 # stacksize 8192 kbytes
64 # % limit stacksize 16000
70 print("SKIPPED\n# most systems run into stacksize limits\n"),exit;
71 use warnings 'regexp' ;
72 $SIG{__WARN__} = sub{local ($m) = shift;
73 $m =~ s/\(\d+\)/(*MASKED*)/;
78 # If this test fails with a segmentation violation or similar,
79 # you may have to increase the default stacksize limit in your
80 # shell. You may need superuser privileges.
82 # Under the sh, ksh, zsh:
89 # stacksize 8192 kbytes
90 # % limit stacksize 16000
93 Complex regular subexpression recursion limit (*MASKED*) exceeded at - line 9.
96 print("SKIPPED\n# most systems run into stacksize limits\n"),exit;
97 no warnings 'regexp' ;
98 $SIG{__WARN__} = sub{local ($m) = shift;
99 $m =~ s/\(\d+\)/(*MASKED*)/;
101 $_ = 'a' x (2**15+1);
104 # If this test fails with a segmentation violation or similar,
105 # you may have to increase the default stacksize limit in your
106 # shell. You may need superuser privileges.
108 # Under the sh, ksh, zsh:
115 # stacksize 8192 kbytes
116 # % limit stacksize 16000
121 # NAME Wide character in non-UTF-8 locale
122 require '../loc_tools.pl';
123 unless (locales_enabled()) {
124 print("SKIPPED\n# locales not available\n"),exit;
126 eval { require POSIX; POSIX->import("locale_h") };
128 print("SKIPPED\n# no POSIX\n"),exit;
130 use warnings 'locale';
132 setlocale(&POSIX::LC_CTYPE, "C");
133 "\x{100}" =~ /\x{100}|\x{101}/il;
134 "\x{100}" =~ /\x{100}|\x{101}/l;
136 "\x{100}" =~ /\x{100}+/l;
137 "\x{100}" =~ /[\x{100}\x{102}]/l;
138 no warnings 'locale';
140 Wide character (U+100) in pattern match (m//) at - line 12.
141 Wide character (U+100) in pattern match (m//) at - line 12.
142 Wide character (U+100) in pattern match (m//) at - line 13.
143 Wide character (U+100) in pattern match (m//) at - line 13.
144 Wide character (U+100) in pattern match (m//) at - line 13.
145 Wide character (U+100) in pattern match (m//) at - line 14.
146 Wide character (U+100) in pattern match (m//) at - line 14.
147 Wide character (U+100) in pattern match (m//) at - line 15.
148 Wide character (U+100) in pattern match (m//) at - line 16.
149 Wide character (U+100) in pattern match (m//) at - line 16.
151 # NAME Wide character in UTF-8 locale
152 require '../loc_tools.pl';
153 unless (locales_enabled()) {
154 print("SKIPPED\n# locales not available\n"),exit;
156 eval { require POSIX; POSIX->import("locale_h") };
158 print("SKIPPED\n# no POSIX\n"),exit;
160 my @utf8_locales = find_utf8_ctype_locale();
161 unless (@utf8_locales) {
162 print("SKIPPED\n# no UTF-8 locales\n"),exit;
164 use warnings 'locale';
166 setlocale(&POSIX::LC_CTYPE, $utf8_locales[0]);
167 "\x{100}" =~ /\x{100}|\x{101}/il;
168 "\x{100}" =~ /\x{100}|\x{101}/l;
170 "\x{100}" =~ /\x{100}+/l;
171 "\x{100}" =~ /[\x{100}\x{102}]/l;
174 # NAME \b{} in non-UTF-8 locale
175 eval { require POSIX; POSIX->import("locale_h") };
177 print("SKIPPED\n# no POSIX\n"),exit;
179 use warnings 'locale';
181 setlocale(&POSIX::LC_CTYPE, "C");
183 no warnings 'locale';
186 Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 8.
187 Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 8.
189 # NAME \b{} in UTF-8 locale
190 require '../loc_tools.pl';
191 unless (locales_enabled()) {
192 print("SKIPPED\n# locales not available\n"),exit;
194 eval { require POSIX; POSIX->import("locale_h") };
196 print("SKIPPED\n# no POSIX\n"),exit;
198 my $utf8_locale = find_utf8_ctype_locale();
199 unless ($utf8_locale) {
200 print("SKIPPED\n# No UTF-8 locale available\n"),exit;
202 use warnings 'locale';
204 setlocale(&POSIX::LC_CTYPE, "C");
205 "abc def" =~ /\b{wb}.*?/;
206 "abc def" =~ /\B{wb}.*?/;
207 setlocale(&POSIX::LC_CTYPE, $utf8_locale);
208 "abc def" =~ /\b{wb}.*?/;
209 "abc def" =~ /\B{wb}.*?/;
211 Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16.
212 Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16.
213 Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17.
214 Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17.
215 Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17.
217 # NAME (?[ ]) in non-UTF-8 locale
218 eval { require POSIX; POSIX->import("locale_h") };
220 print("SKIPPED\n# no POSIX\n"),exit;
222 no warnings 'experimental::regex_sets';
223 use warnings 'locale';
225 setlocale(&POSIX::LC_CTYPE, "C");
226 "\N{KELVIN SIGN}" =~ /(?[ \N{KELVIN SIGN} ])/i;
227 "K" =~ /(?[ \N{KELVIN SIGN} ])/i;
228 "k" =~ /(?[ \N{KELVIN SIGN} ])/i;
230 no warnings 'locale';
232 Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 9.
233 Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 9.
234 Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 10.
235 Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 10.
236 Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 11.
237 Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 11.
238 Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 12.
239 Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 12.
241 # NAME (?[ ]) in UTF-8 locale
242 require '../loc_tools.pl';
243 unless (locales_enabled()) {
244 print("SKIPPED\n# locales not available\n"),exit;
246 eval { require POSIX; POSIX->import("locale_h") };
248 print("SKIPPED\n# no POSIX\n"),exit;
250 my $utf8_locale = find_utf8_ctype_locale();
251 unless ($utf8_locale) {
252 print("SKIPPED\n# No UTF-8 locale available\n"),exit;
254 no warnings 'experimental::regex_sets';
255 use warnings 'locale';
257 setlocale(&POSIX::LC_CTYPE, $utf8_locale);
258 "\N{KELVIN SIGN}" =~ /(?[ \N{KELVIN SIGN} ])/i;
259 "K" =~ /(?[ \N{KELVIN SIGN} ])/i;
260 "k" =~ /(?[ \N{KELVIN SIGN} ])/i;