Commit | Line | Data |
---|---|---|
fe13d51d | 1 | #!/usr/bin/perl |
f7b649f0 | 2 | |
99a4af00 | 3 | BEGIN { |
0bfe7176 | 4 | @INC = '..' if -f '../TestInit.pm'; |
99a4af00 | 5 | } |
0bfe7176 | 6 | use TestInit qw(T); # T is chdir to the top level |
f7b649f0 | 7 | |
0bfe7176 NC |
8 | use warnings; |
9 | use strict; | |
f7b649f0 | 10 | |
0bfe7176 NC |
11 | require 't/test.pl'; |
12 | plan('no_plan'); | |
fe13d51d | 13 | |
1eb3f3ad JM |
14 | # --make-exceptions-list outputs the list of strings that don't have |
15 | # perldiag.pod entries to STDERR without TAP formatting, so they can | |
16 | # easily be put in the __DATA__ section of this file. This was done | |
17 | # initially so as to not create new test failures upon the initial | |
18 | # creation of this test file. You probably shouldn't do it again. | |
19 | # Just add the documentation instead. | |
f7223e8e | 20 | my $make_exceptions_list = ($ARGV[0]||'') eq '--make-exceptions-list'; |
87a63fff | 21 | |
0bfe7176 | 22 | require 'regen/embed_lib.pl'; |
45f1c7ba | 23 | |
9c9407cf | 24 | # Look for functions that look like they could be diagnostic ones. |
1b1ee2ef | 25 | my @functions; |
9c9407cf NC |
26 | foreach (@{(setup_embed())[0]}) { |
27 | next if @$_ < 2; | |
dc996669 | 28 | next unless $_->[2] =~ /warn|(?<!ov)err|(\b|_)die|croak/i; |
1b1ee2ef KW |
29 | # The flag p means that this function may have a 'Perl_' prefix |
30 | # The flag s means that this function may have a 'S_' prefix | |
9c9407cf NC |
31 | push @functions, $_->[2]; |
32 | push @functions, 'Perl_' . $_->[2] if $_->[0] =~ /p/; | |
33 | push @functions, 'S_' . $_->[2] if $_->[0] =~ /s/; | |
34 | }; | |
1b1ee2ef | 35 | |
946095af | 36 | my $regcomp_fail_re = '\b(?:(?:Simple_)?v)?FAIL[2-4]?(?:utf8f)?\b'; |
20c98eb0 FC |
37 | my $regcomp_re = |
38 | "(?<routine>ckWARN(?:\\d+)?reg\\w*|vWARN\\d+|$regcomp_fail_re)"; | |
39 | my $function_re = join '|', @functions; | |
b26f9440 | 40 | my $source_msg_re = |
20c98eb0 | 41 | "(?<routine>\\bDIE\\b|$function_re)"; |
de53a0ea | 42 | my $text_re = '"(?<text>(?:\\\\"|[^"]|"\s*[A-Z_]+\s*")*)"'; |
78cd53af | 43 | my $source_msg_call_re = qr/$source_msg_re(?:_nocontext)? \s* |
d19547b5 | 44 | \((?:aTHX_)? \s* |
78cd53af DM |
45 | (?:packWARN\d*\((?<category>.*?)\),)? \s* |
46 | $text_re /x; | |
47 | my $bad_version_re = qr{BADVERSION\([^"]*$text_re}; | |
b26f9440 | 48 | $regcomp_fail_re = qr/$regcomp_fail_re\([^"]*$text_re/; |
b33c0c71 | 49 | my $regcomp_call_re = qr/$regcomp_re.*?$text_re/; |
fe13d51d JM |
50 | |
51 | my %entries; | |
1b1ee2ef KW |
52 | |
53 | # Get the ignores that are compiled into this file | |
62f5f54d | 54 | my $reading_categorical_exceptions; |
87a63fff JM |
55 | while (<DATA>) { |
56 | chomp; | |
beb1a06e FC |
57 | $entries{$_}{todo} = 1; |
58 | $reading_categorical_exceptions and $entries{$_}{cattodo}=1; | |
62f5f54d | 59 | /__CATEGORIES__/ and ++$reading_categorical_exceptions; |
87a63fff JM |
60 | } |
61 | ||
808910a9 | 62 | my $pod = "pod/perldiag.pod"; |
fe13d51d | 63 | my $cur_entry; |
808910a9 KW |
64 | open my $diagfh, "<", $pod |
65 | or die "Can't open $pod: $!"; | |
1b1ee2ef | 66 | |
64fbf0dd | 67 | my $category_re = qr/ [a-z0-9_:]+?/; # Note: requires an initial space |
4cf67031 KW |
68 | my $severity_re = qr/ . (?: \| . )* /x; # A severity is a single char, but can |
69 | # be of the form 'S|P|W' | |
62f5f54d | 70 | my @same_descr; |
fe13d51d JM |
71 | while (<$diagfh>) { |
72 | if (m/^=item (.*)/) { | |
6fbc9859 MH |
73 | $cur_entry = $1; |
74 | ||
75 | # Allow multi-line headers | |
76 | while (<$diagfh>) { | |
77 | if (/^\s*$/) { | |
78 | last; | |
79 | } | |
80 | ||
81 | $cur_entry .= $_; | |
82 | } | |
83 | ||
84 | $cur_entry =~ s/\n/ /gs; # Fix multi-line headers if they have \n's | |
85 | $cur_entry =~ s/\s+\z//; | |
4cf67031 | 86 | |
beb1a06e FC |
87 | if (exists $entries{$cur_entry} && $entries{$cur_entry}{todo} |
88 | && !$entries{$cur_entry}{cattodo}) { | |
b61b433c KW |
89 | TODO: { |
90 | local $::TODO = "Remove the TODO entry \"$cur_entry\" from DATA as it is already in $pod near line $."; | |
91 | ok($cur_entry); | |
92 | } | |
9c3e8e01 | 93 | } |
4cf67031 KW |
94 | # Make sure to init this here, so an actual entry in perldiag |
95 | # overwrites one in DATA. | |
87a63fff | 96 | $entries{$cur_entry}{todo} = 0; |
4cf67031 | 97 | $entries{$cur_entry}{line_number} = $.; |
4cf67031 KW |
98 | } |
99 | ||
100 | next if ! defined $cur_entry; | |
101 | ||
102 | if (! $entries{$cur_entry}{severity}) { | |
103 | if (/^ \( ( $severity_re ) | |
104 | ||
105 | # Can have multiple categories separated by commas | |
62f5f54d | 106 | ( $category_re (?: , $category_re)* )? \) /x) |
4cf67031 KW |
107 | { |
108 | $entries{$cur_entry}{severity} = $1; | |
62f5f54d FC |
109 | $entries{$cur_entry}{category} = |
110 | $2 && join ", ", sort split " ", $2 =~ y/,//dr; | |
111 | ||
112 | # Record it also for other messages sharing the same description | |
113 | @$_{qw<severity category>} = | |
114 | @{$entries{$cur_entry}}{qw<severity category>} | |
115 | for @same_descr; | |
4cf67031 KW |
116 | } |
117 | elsif (! $entries{$cur_entry}{first_line} && $_ =~ /\S/) { | |
118 | ||
119 | # Keep track of first line of text if doesn't contain a severity, so | |
120 | # that can later examine it to determine if that is ok or not | |
121 | $entries{$cur_entry}{first_line} = $_; | |
122 | } | |
62f5f54d FC |
123 | if (/\S/) { |
124 | @same_descr = (); | |
125 | } | |
126 | else { | |
127 | push @same_descr, $entries{$cur_entry}; | |
128 | } | |
fe13d51d JM |
129 | } |
130 | } | |
131 | ||
4cf67031 KW |
132 | foreach my $cur_entry ( keys %entries) { |
133 | next if $entries{$cur_entry}{todo}; # If in this file, won't have a severity | |
134 | if (! exists $entries{$cur_entry}{severity} | |
135 | ||
136 | # If there is no first line, it was two =items in a row, so the | |
137 | # second one is the one with with text, not this one. | |
138 | && exists $entries{$cur_entry}{first_line} | |
139 | ||
140 | # If the first line refers to another message, no need for severity | |
141 | && $entries{$cur_entry}{first_line} !~ /^See/) | |
142 | { | |
143 | fail($cur_entry); | |
144 | diag( | |
145 | " $pod entry at line $entries{$cur_entry}{line_number}\n" | |
146 | . " \"$cur_entry\"\n" | |
147 | . " is missing a severity and/or category" | |
148 | ); | |
149 | } | |
150 | } | |
151 | ||
78cd53af DM |
152 | # List from perlguts.pod "Formatted Printing of IVs, UVs, and NVs" |
153 | # Convert from internal formats to ones that the readers will be familiar | |
154 | # with, while removing any format modifiers, such as precision, the | |
155 | # presence of which would just confuse the pod's explanation | |
156 | my %specialformats = (IVdf => 'd', | |
157 | UVuf => 'd', | |
158 | UVof => 'o', | |
159 | UVxf => 'x', | |
160 | UVXf => 'X', | |
161 | NVef => 'f', | |
162 | NVff => 'f', | |
163 | NVgf => 'f', | |
b8fa5213 | 164 | HEKf256=>'s', |
fa871b03 | 165 | HEKf => 's', |
b17a0679 | 166 | UTF8f=> 's', |
f0eec8b8 FC |
167 | SVf256=>'s', |
168 | SVf32=> 's', | |
78cd53af DM |
169 | SVf => 's'); |
170 | my $format_modifiers = qr/ [#0\ +-]* # optional flags | |
171 | (?: [1-9][0-9]* | \* )? # optional field width | |
172 | (?: \. \d* )? # optional precision | |
173 | (?: h|l )? # optional length modifier | |
174 | /x; | |
175 | ||
f0eec8b8 FC |
176 | my $specialformats = |
177 | join '|', sort { length $b cmp length $a } keys %specialformats; | |
78cd53af DM |
178 | my $specialformats_re = qr/%$format_modifiers"\s*($specialformats)(\s*")?/; |
179 | ||
e166f153 NC |
180 | open my $fh, '<', 'MANIFEST' or die "Can't open MANIFEST: $!"; |
181 | while (my $file = <$fh>) { | |
e166f153 NC |
182 | chomp $file; |
183 | $file =~ s/\s+.*//; | |
cd40cd58 NC |
184 | next unless $file =~ /\.(?:c|cpp|h|xs|y)\z/ or $file =~ /^perly\./; |
185 | # OS/2 extensions have never been migrated to ext/, hence the special case: | |
186 | next if $file =~ m!\A(?:ext|dist|cpan|lib|t|os2/OS2)/! | |
187 | && $file !~ m!\Aext/DynaLoader/!; | |
e166f153 | 188 | check_file($file); |
fe13d51d | 189 | } |
e166f153 | 190 | close $fh or die $!; |
fe13d51d | 191 | |
abd65dc0 DG |
192 | # Standardize messages with variants into the form that appears |
193 | # in perldiag.pod -- useful for things without a diag_listed_as annotation | |
194 | sub standardize { | |
195 | my ($name) = @_; | |
196 | ||
197 | if ( $name =~ m/^(Invalid strict version format) \([^\)]*\)/ ) { | |
198 | $name = "$1 (\%s)"; | |
199 | } | |
200 | elsif ( $name =~ m/^(Invalid version format) \([^\)]*\)/ ) { | |
201 | $name = "$1 (\%s)"; | |
202 | } | |
203 | elsif ($name =~ m/^panic: /) { | |
204 | $name = "panic: \%s"; | |
205 | } | |
206 | ||
207 | return $name; | |
208 | } | |
209 | ||
fe13d51d JM |
210 | sub check_file { |
211 | my ($codefn) = @_; | |
212 | ||
abd65dc0 | 213 | print "# Checking $codefn\n"; |
fe13d51d | 214 | |
38ec24b4 | 215 | open my $codefh, "<", $codefn |
fe13d51d JM |
216 | or die "Can't open $codefn: $!"; |
217 | ||
218 | my $listed_as; | |
219 | my $listed_as_line; | |
220 | my $sub = 'top of file'; | |
221 | while (<$codefh>) { | |
222 | chomp; | |
223 | # Getting too much here isn't a problem; we only use this to skip | |
224 | # errors inside of XS modules, which should get documented in the | |
225 | # docs for the module. | |
78cd53af DM |
226 | if (m<^[^#\s]> and $_ !~ m/^[{}]*$/) { |
227 | $sub = $_; | |
fe13d51d JM |
228 | } |
229 | next if $sub =~ m/^XS/; | |
4e85e1b4 | 230 | if (m</\*\s*diag_listed_as: (.*?)\s*\*/>) { |
fe13d51d JM |
231 | $listed_as = $1; |
232 | $listed_as_line = $.+1; | |
233 | } | |
234 | next if /^#/; | |
1b1ee2ef | 235 | |
c4ea5f2e | 236 | my $multiline = 0; |
1b1ee2ef | 237 | # Loop to accumulate the message text all on one line. |
b78a1974 | 238 | if (m/\b(?:$source_msg_re(?:_nocontext)?|$regcomp_re)\s*\(/) { |
78cd53af DM |
239 | while (not m/\);$/) { |
240 | my $nextline = <$codefh>; | |
241 | # Means we fell off the end of the file. Not terribly surprising; | |
242 | # this code tries to merge a lot of things that aren't regular C | |
243 | # code (preprocessor stuff, long comments). That's OK; we don't | |
244 | # need those anyway. | |
245 | last if not defined $nextline; | |
246 | chomp $nextline; | |
247 | $nextline =~ s/^\s+//; | |
248 | $_ =~ s/\\$//; | |
249 | # Note that we only want to do this where *both* are true. | |
45c76a8e FC |
250 | if ($_ =~ m/"\s*$/ and $nextline =~ m/^"/) { |
251 | $_ =~ s/"\s*$//; | |
78cd53af DM |
252 | $nextline =~ s/^"//; |
253 | } | |
254 | $_ .= $nextline; | |
255 | ++$multiline; | |
fe13d51d | 256 | } |
fe13d51d JM |
257 | } |
258 | # This should happen *after* unwrapping, or we don't reformat the things | |
259 | # in later lines. | |
78cd53af DM |
260 | |
261 | s/$specialformats_re/"%$specialformats{$1}" . (defined $2 ? '' : '"')/ge; | |
78d0fecf KW |
262 | |
263 | # Remove any remaining format modifiers, but not in %% | |
264 | s/ (?<!%) % $format_modifiers ( [dioxXucsfeEgGp] ) /%$1/xg; | |
265 | ||
fe13d51d | 266 | # The %"foo" thing needs to happen *before* this regex. |
1b1ee2ef KW |
267 | # diag($_); |
268 | # DIE is just return Perl_die | |
b33c0c71 | 269 | my ($name, $category, $routine); |
b78a1974 | 270 | if (/\b$source_msg_call_re/) { |
b33c0c71 | 271 | ($name, $category, $routine) = ($+{'text'}, $+{'category'}, $+{'routine'}); |
62f5f54d FC |
272 | # Sometimes the regexp will pick up too much for the category |
273 | # e.g., WARN_UNINITIALIZED), PL_warn_uninit_sv ... up to the next ) | |
274 | $category && $category =~ s/\).*//s; | |
78cd53af DM |
275 | } |
276 | elsif (/$bad_version_re/) { | |
277 | ($name, $category) = ($+{'text'}, undef); | |
278 | } | |
b26f9440 FC |
279 | elsif (/$regcomp_fail_re/) { |
280 | # FAIL("foo") -> "foo in regex m/%s/" | |
281 | # vFAIL("foo") -> "foo in regex; marked by <-- HERE in m/%s/" | |
282 | ($name, $category) = ($+{'text'}, undef); | |
283 | $name .= | |
284 | " in regex" . ("; marked by <-- HERE in" x /vFAIL/) . " m/%s/"; | |
285 | } | |
b33c0c71 MH |
286 | elsif (/$regcomp_call_re/) { |
287 | # vWARN/ckWARNreg("foo") -> "foo in regex; marked by <-- HERE in m/%s/ | |
288 | ($name, $category, $routine) = ($+{'text'}, undef, $+{'routine'}); | |
289 | $name .= " in regex; marked by <-- HERE in m/%s/"; | |
290 | $category = 'WARN_REGEXP'; | |
291 | if ($routine =~ /dep/) { | |
292 | $category .= ',WARN_DEPRECATED'; | |
293 | } | |
294 | } | |
78cd53af DM |
295 | else { |
296 | next; | |
297 | } | |
298 | ||
3cfe9c80 FC |
299 | # Try to guess what the severity should be. In the case of |
300 | # Perl_ck_warner and other _ck_ functions, we can tell whether it is | |
301 | # a severe/default warning or no by the _d suffix. In the case of | |
302 | # other warn functions we cannot tell, because Perl_warner may be pre- | |
303 | # ceded by if(ckWARN) or if(ckWARN_d). | |
b33c0c71 MH |
304 | my $severity = !$routine ? '[PFX]' |
305 | : $routine =~ /warn.*_d\z/ ? '[DS]' | |
3cfe9c80 | 306 | : $routine =~ /ck_warn/ ? 'W' |
ff9c1ae8 FC |
307 | : $routine =~ /warner/ ? '[WDS]' |
308 | : $routine =~ /warn/ ? 'S' | |
3cfe9c80 | 309 | : $routine =~ /ckWARN.*dep/ ? 'D' |
0008e927 | 310 | : $routine =~ /ckWARN\d*reg_d/? 'S' |
3cfe9c80 | 311 | : $routine =~ /ckWARN\d*reg/ ? 'W' |
b33c0c71 MH |
312 | : $routine =~ /vWARN\d/ ? '[WDS]' |
313 | : '[PFX]'; | |
62f5f54d | 314 | my $categories; |
49a5993e | 315 | if (defined $category) { |
64fbf0dd | 316 | $category =~ s/__/::/g; |
62f5f54d FC |
317 | $categories = |
318 | join ", ", | |
319 | sort map {s/^WARN_//; lc $_} split /\s*[|,]\s*/, $category; | |
1b1ee2ef | 320 | } |
c4ea5f2e | 321 | if ($listed_as and $listed_as_line == $. - $multiline) { |
c0a76f06 | 322 | $name = $listed_as; |
1b1ee2ef | 323 | } else { |
c0a76f06 DM |
324 | # The form listed in perldiag ignores most sorts of fancy printf |
325 | # formatting, or makes it more perlish. | |
4111bb7b | 326 | $name =~ s/%%/%/g; |
c0a76f06 DM |
327 | $name =~ s/%l[ud]/%d/g; |
328 | $name =~ s/%\.(\d+|\*)s/\%s/g; | |
ca53083a | 329 | $name =~ s/(?:%s){2,}/%s/g; |
de78ba8e | 330 | $name =~ s/(\\")|("\s*[A-Z_]+\s*")/$1 ? '"' : '%s'/egg; |
c0a76f06 | 331 | $name =~ s/\\t/\t/g; |
366fc280 | 332 | $name =~ s/\\n/\n/g; |
c0a76f06 DM |
333 | $name =~ s/\s+$//; |
334 | $name =~ s/(\\)\\/$1/g; | |
335 | } | |
fe13d51d | 336 | |
c0a76f06 DM |
337 | # Extra explanatory info on an already-listed error, doesn't |
338 | # need it's own listing. | |
339 | next if $name =~ m/^\t/; | |
fe13d51d | 340 | |
c0a76f06 DM |
341 | # Happens fairly often with PL_no_modify. |
342 | next if $name eq '%s'; | |
fe13d51d | 343 | |
c0a76f06 DM |
344 | # Special syntax for magic comment, allows ignoring the fact |
345 | # that it isn't listed. Only use in very special circumstances, | |
346 | # like this script failing to notice that the Perl_croak call is | |
347 | # inside an #if 0 block. | |
348 | next if $name eq 'SKIPME'; | |
fe13d51d | 349 | |
ff20b672 YO |
350 | next if $name=~/\[TESTING\]/; # ignore these as they are works in progress |
351 | ||
62f5f54d | 352 | check_message(standardize($name),$codefn,$severity,$categories); |
366fc280 FC |
353 | } |
354 | } | |
355 | ||
356 | sub check_message { | |
62f5f54d | 357 | my($name,$codefn,$severity,$categories,$partial) = @_; |
366fc280 FC |
358 | my $key = $name =~ y/\n/ /r; |
359 | my $ret; | |
2c86d456 | 360 | |
b33c0c71 MH |
361 | # Try to reduce printf() formats to simplest forms |
362 | # Really this should be matching %s, etc like diagnostics.pm does | |
363 | ||
364 | # Kill flags | |
365 | $key =~ s/%[#0\-+]/%/g; | |
366 | ||
367 | # Kill width | |
368 | $key =~ s/\%(\d+|\*)/%/g; | |
369 | ||
370 | # Kill precision | |
371 | $key =~ s/\%\.(\d+|\*)/%/g; | |
372 | ||
beb1a06e FC |
373 | if (exists $entries{$key} and |
374 | # todo + cattodo means it is not found and it is not in the | |
375 | # regular todo list, either | |
376 | !$entries{$key}{todo} || !$entries{$key}{cattodo}) { | |
366fc280 FC |
377 | $ret = 1; |
378 | if ( $entries{$key}{seen}++ ) { | |
c0a76f06 | 379 | # no need to repeat entries we've tested |
207e3571 | 380 | } elsif ($entries{$key}{todo}) { |
87a63fff | 381 | TODO: { |
c0a76f06 DM |
382 | no warnings 'once'; |
383 | local $::TODO = 'in DATA'; | |
384 | # There is no listing, but it is in the list of exceptions. TODO FAIL. | |
207e3571 | 385 | fail($key); |
c0a76f06 DM |
386 | diag( |
387 | " Message '$name'\n from $codefn line $. is not listed in $pod\n". | |
388 | " (but it wasn't documented in 5.10 either, so marking it TODO)." | |
389 | ); | |
87a63fff | 390 | } |
c0a76f06 DM |
391 | } else { |
392 | # We found an actual valid entry in perldiag.pod for this error. | |
b8d24c3d | 393 | pass($key); |
62f5f54d | 394 | |
4a32881b NC |
395 | return $ret |
396 | if $entries{$key}{cattodo}; | |
397 | ||
62f5f54d FC |
398 | # Now check the category and severity |
399 | ||
400 | # Cache our severity qr thingies | |
4a32881b | 401 | use feature 'state'; |
62f5f54d FC |
402 | state %qrs; |
403 | my $qr = $qrs{$severity} ||= qr/$severity/; | |
404 | ||
4a32881b | 405 | like($entries{$key}{severity}, $qr, |
3cfe9c80 FC |
406 | $severity =~ /\[/ |
407 | ? "severity is one of $severity for $key" | |
4a32881b | 408 | : "severity is $severity for $key"); |
6fbc9859 | 409 | |
4a32881b | 410 | is($entries{$key}{category}, $categories, |
62f5f54d | 411 | ($categories ? "categories are [$categories]" : "no category") |
4a32881b | 412 | . " for $key"); |
fe13d51d | 413 | } |
366fc280 FC |
414 | } elsif ($partial) { |
415 | # noop | |
c0a76f06 | 416 | } else { |
366fc280 FC |
417 | my $ok; |
418 | if ($name =~ /\n/) { | |
419 | $ok = 1; | |
62f5f54d FC |
420 | check_message($_,$codefn,$severity,$categories,1) or $ok = 0, last |
421 | for split /\n/, $name; | |
366fc280 FC |
422 | } |
423 | if ($ok) { | |
424 | # noop | |
425 | } elsif ($make_exceptions_list) { | |
c0a76f06 DM |
426 | # We're making an updated version of the exception list, to |
427 | # stick in the __DATA__ section. I honestly can't think of | |
428 | # a situation where this is the right thing to do, but I'm | |
429 | # leaving it here, just in case one of my descendents thinks | |
430 | # it's a good idea. | |
366fc280 | 431 | print STDERR "$key\n"; |
c0a76f06 DM |
432 | } else { |
433 | # No listing found, and no excuse either. | |
434 | # Find the correct place in perldiag.pod, and add a stanza beginning =item $name. | |
435 | fail($name); | |
436 | diag(" Message '$name'\n from $codefn line $. is not listed in $pod"); | |
437 | } | |
438 | # seen it, so only fail once for this message | |
439 | $entries{$name}{seen}++; | |
440 | } | |
fe13d51d | 441 | |
c0a76f06 | 442 | die if $name =~ /%$/; |
366fc280 | 443 | return $ret; |
fe13d51d | 444 | } |
c0a76f06 | 445 | |
93f09d7b | 446 | # Lists all missing things as of the inauguration of this script, so we |
87a63fff | 447 | # don't have to go from "meh" to perfect all at once. |
b0227916 JM |
448 | # |
449 | # PLEASE DO NOT ADD TO THIS LIST. Instead, write an entry in | |
675fa9ff FC |
450 | # pod/perldiag.pod for your new (warning|error). Nevertheless, |
451 | # listing exceptions here when this script is not smart enough | |
452 | # to recognize the messages is not so bad, as long as there are | |
453 | # entries in perldiag. | |
fed3ba5d | 454 | |
62f5f54d FC |
455 | # Entries after __CATEGORIES__ are those that are in perldiag but fail the |
456 | # severity/category test. | |
457 | ||
fed3ba5d NC |
458 | # Also FIXME this test, as the first entry in TODO *is* covered by the |
459 | # description: Malformed UTF-8 character (%s) | |
87a63fff | 460 | __DATA__ |
78d0fecf | 461 | Malformed UTF-8 character (unexpected non-continuation byte 0x%x, immediately after start byte 0x%x) |
fed3ba5d | 462 | |
5f2c6f7e | 463 | Cannot apply "%s" in non-PerlIO perl |
043fb3eb | 464 | Can't find DLL name for the module `%s' by the handle %d, rc=%u=%x |
5f2c6f7e | 465 | Can't find string terminator %c%s%c anywhere before EOF |
87a63fff JM |
466 | Can't fix broken locale name "%s" |
467 | Can't get short module name from a handle | |
043fb3eb | 468 | Can't load DLL `%s', possible problematic module `%s' |
c8028aa6 | 469 | Can't locate %s: %s |
87a63fff | 470 | Can't locate object method "%s" via package "%s" (perhaps you forgot to load "%s"?) |
5f2c6f7e | 471 | Can't pipe "%s": %s |
043fb3eb | 472 | Can't set type on DOS |
5f2c6f7e | 473 | Can't spawn: %s |
87a63fff JM |
474 | Can't spawn "%s": %s |
475 | Can't %s script `%s' with ARGV[0] being `%s' | |
476 | Can't %s "%s": %s | |
87a63fff | 477 | Can't %s `%s' with ARGV[0] being `%s' (looking for executables only, not found) |
973a7615 | 478 | Can't use string ("%s"%s) as a subroutine ref while "strict refs" in use |
87a63fff | 479 | Character(s) in '%c' format wrapped in %s |
5f2c6f7e FC |
480 | chown not implemented! |
481 | clear %s | |
87a63fff JM |
482 | Code missing after '/' in pack |
483 | Code missing after '/' in unpack | |
87a63fff | 484 | '%c' outside of string in pack |
ca53083a | 485 | Debug leaking scalars child failed%s with errno %d: %s |
043fb3eb FC |
486 | detach of a thread which could not start |
487 | detach on an already detached thread | |
488 | detach on a thread with a waiter | |
5f2c6f7e | 489 | '/' does not take a repeat count in %s |
87a63fff | 490 | -Dp not implemented on this platform |
043fb3eb FC |
491 | Empty array reference given to mod2fname |
492 | Error loading module '%s': %s' | |
87a63fff | 493 | Error reading "%s": %s |
5f2c6f7e FC |
494 | execl not implemented! |
495 | EVAL without pos change exceeded limit in regex | |
87a63fff JM |
496 | Filehandle opened only for %sput |
497 | Filehandle %s opened only for %sput | |
498 | Filehandle STD%s reopened as %s only for input | |
043fb3eb | 499 | file_type not implemented on DOS |
5f2c6f7e | 500 | filter_del can only delete in reverse order (currently) |
87a63fff | 501 | YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET! FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP! |
5f2c6f7e | 502 | free %s |
c80bcca7 FC |
503 | Function "endnetent" not implemented in this version of perl. |
504 | Function "endprotoent" not implemented in this version of perl. | |
505 | Function "endservent" not implemented in this version of perl. | |
506 | Function "getnetbyaddr" not implemented in this version of perl. | |
507 | Function "getnetbyname" not implemented in this version of perl. | |
508 | Function "getnetent" not implemented in this version of perl. | |
509 | Function "getprotobyname" not implemented in this version of perl. | |
510 | Function "getprotobynumber" not implemented in this version of perl. | |
511 | Function "getprotoent" not implemented in this version of perl. | |
512 | Function "getservbyport" not implemented in this version of perl. | |
513 | Function "getservent" not implemented in this version of perl. | |
514 | Function "getsockopt" not implemented in this version of perl. | |
515 | Function "recvmsg" not implemented in this version of perl. | |
516 | Function "sendmsg" not implemented in this version of perl. | |
517 | Function "sethostent" not implemented in this version of perl. | |
518 | Function "setnetent" not implemented in this version of perl. | |
519 | Function "setprotoent" not implemented in this version of perl. | |
520 | Function "setservent" not implemented in this version of perl. | |
521 | Function "setsockopt" not implemented in this version of perl. | |
522 | Function "tcdrain" not implemented in this version of perl. | |
523 | Function "tcflow" not implemented in this version of perl. | |
524 | Function "tcflush" not implemented in this version of perl. | |
525 | Function "tcsendbreak" not implemented in this version of perl. | |
87a63fff | 526 | get %s %p %p %p |
5f2c6f7e | 527 | getpwnam returned invalid UIC %o for user "%s" |
87a63fff JM |
528 | glob failed (can't start child: %s) |
529 | glob failed (child exited with status %d%s) | |
043fb3eb | 530 | Got an error from DosAllocMem: %i |
87a63fff JM |
531 | Goto undefined subroutine |
532 | Goto undefined subroutine &%s | |
5f2c6f7e FC |
533 | Got signal %d |
534 | ()-group starts with a count in %s | |
535 | Illegal binary digit '%c' ignored | |
87a63fff | 536 | Illegal character %sin prototype for %s : %s |
5f2c6f7e FC |
537 | Illegal hexadecimal digit '%c' ignored |
538 | Illegal octal digit '%c' ignored | |
043fb3eb | 539 | INSTALL_PREFIX too long: `%s' |
5f2c6f7e | 540 | Invalid argument to sv_cat_decode |
87a63fff JM |
541 | Invalid range "%c-%c" in transliteration operator |
542 | Invalid separator character %c%c%c in PerlIO layer specification %s | |
543 | Invalid TOKEN object ignored | |
544 | Invalid type '%c' in pack | |
545 | Invalid type '%c' in %s | |
546 | Invalid type '%c' in unpack | |
547 | Invalid type ',' in %s | |
5f2c6f7e | 548 | ioctlsocket not implemented! |
043fb3eb | 549 | join with a thread with a waiter |
5f2c6f7e | 550 | killpg not implemented! |
5f2c6f7e | 551 | List form of pipe open not implemented |
043fb3eb | 552 | Looks like we have no PM; will not load DLL %s without $ENV{PERL_ASIF_PM} |
5f2c6f7e | 553 | Malformed integer in [] in %s |
043fb3eb | 554 | Malformed %s |
87a63fff | 555 | Malformed UTF-8 character (fatal) |
87a63fff JM |
556 | Missing (suid) fd script name |
557 | More than one argument to open | |
558 | More than one argument to open(,':%s') | |
beb1a06e | 559 | \N{} in character class restricted to one character in regex; marked by <-- HERE in m/%s/ |
043fb3eb | 560 | No message queue |
5f2c6f7e FC |
561 | No %s allowed while running setgid |
562 | No %s allowed with (suid) fdscript | |
87a63fff | 563 | Not an XSUB reference |
043fb3eb FC |
564 | Not a reference given to mod2fname |
565 | Not array reference given to mod2fname | |
87a63fff | 566 | Operator or semicolon missing before %c%s |
928729ea | 567 | Out of memory during list extend |
043fb3eb | 568 | panic queryaddr |
c999563f | 569 | PerlApp::TextQuery: no arguments, please |
b26f9440 | 570 | POSIX syntax [%c %c] is reserved for future extensions in regex; marked by <-- HERE in m/%s/ |
78d0fecf | 571 | ptr wrong %p != %p fl=%x nl=%p e=%p for %d |
043fb3eb | 572 | QUITing... |
87a63fff | 573 | Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) |
b26f9440 | 574 | Regexp *+ operand could be empty in regex; marked by <-- HERE in m/%s/ |
87a63fff | 575 | Reversed %c= operator |
043fb3eb | 576 | %s: Can't parse EXE/DLL name: '%s' |
78d0fecf | 577 | %s(%f) failed |
87a63fff | 578 | %sCompilation failed in require |
b26f9440 FC |
579 | Sequence (?%c...) not implemented in regex; marked by <-- HERE in m/%s/ |
580 | Sequence (%s...) not recognized in regex; marked by <-- HERE in m/%s/ | |
b26f9440 FC |
581 | Sequence %s... not terminated in regex; marked by <-- HERE in m/%s/ |
582 | Sequence (?%c... not terminated in regex; marked by <-- HERE in m/%s/ | |
583 | Sequence (?(%c... not terminated in regex; marked by <-- HERE in m/%s/ | |
584 | Sequence (?R) not terminated in regex m/%s/ | |
043fb3eb | 585 | %s: Error stripping dirs from EXE/DLL/INSTALLDIR name |
87a63fff JM |
586 | set %s %p %p %p |
587 | %s free() ignored (RMAGIC, PERL_CORE) | |
588 | %s has too many errors. | |
589 | SIG%s handler "%s" not defined. | |
87a63fff JM |
590 | %s in %s |
591 | Size magic not implemented | |
043fb3eb | 592 | %s: name `%s' too long |
87a63fff | 593 | %s number > %s non-portable |
87a63fff | 594 | %srealloc() %signored |
5f2c6f7e | 595 | %s in regex m/%s/ |
ca53083a | 596 | %s on %s %s |
5f2c6f7e | 597 | socketpair not implemented! |
043fb3eb | 598 | %s: %s |
87a63fff JM |
599 | Starting Full Screen process with flag=%d, mytype=%d |
600 | Starting PM process with flag=%d, mytype=%d | |
5f2c6f7e | 601 | sv_2iv assumed (U_V(fabs((double)SvNVX(sv))) < (UV)IV_MAX) but SvNVX(sv)=%f U_V is 0x%x, IV_MAX is 0x%x |
5f2c6f7e FC |
602 | switching effective gid is not implemented |
603 | switching effective uid is not implemented | |
604 | System V IPC is not implemented on this machine | |
87a63fff | 605 | -T and -B not implemented on filehandles |
5f2c6f7e | 606 | Terminating on signal SIG%s(%d) |
5f2c6f7e | 607 | The crypt() function is not implemented on NetWare |
87a63fff JM |
608 | The flock() function is not implemented on NetWare |
609 | The rewinddir() function is not implemented on NetWare | |
610 | The seekdir() function is not implemented on NetWare | |
87a63fff | 611 | The telldir() function is not implemented on NetWare |
043fb3eb FC |
612 | This perl was compiled without taint support. Cowardly refusing to run with -t or -T flags |
613 | This version of OS/2 does not support %s.%s | |
87a63fff | 614 | Too deeply nested ()-groups in %s |
87a63fff JM |
615 | Too many args on %s line of "%s" |
616 | U0 mode on a byte string | |
5f2c6f7e | 617 | unable to find VMSPIPE.COM for i/o piping |
043fb3eb | 618 | Unexpected program mode %d when morphing back from PM |
5f2c6f7e | 619 | Unrecognized character %s; marked by <-- HERE after %s<-- HERE near column %d |
87a63fff | 620 | Unstable directory path, current directory changed unexpectedly |
87a63fff | 621 | Unterminated compressed integer in unpack |
87a63fff | 622 | Usage: %s::%s(%s) |
5f2c6f7e FC |
623 | Usage: File::Copy::rmscopy(from,to[,date_flag]) |
624 | Usage: VMS::Filespec::candelete(spec) | |
625 | Usage: VMS::Filespec::fileify(spec) | |
626 | Usage: VMS::Filespec::pathify(spec) | |
627 | Usage: VMS::Filespec::rmsexpand(spec[,defspec]) | |
628 | Usage: VMS::Filespec::unixify(spec) | |
629 | Usage: VMS::Filespec::unixpath(spec) | |
87a63fff | 630 | Usage: VMS::Filespec::unixrealpath(spec) |
5f2c6f7e FC |
631 | Usage: VMS::Filespec::vmsify(spec) |
632 | Usage: VMS::Filespec::vmspath(spec) | |
87a63fff JM |
633 | Usage: VMS::Filespec::vmsrealpath(spec) |
634 | Use of inherited AUTOLOAD for non-method %s::%s() is deprecated | |
78d0fecf | 635 | utf8 "\x%X" does not map to Unicode |
87a63fff | 636 | Value of logical "%s" too long. Truncating to %i bytes |
5f2c6f7e | 637 | waitpid: process %x is not a child of process %x |
87a63fff JM |
638 | Wide character |
639 | Wide character in $/ | |
5f2c6f7e | 640 | Within []-length '*' not allowed in %s |
87a63fff | 641 | Within []-length '%c' not allowed in %s |
043fb3eb | 642 | Wrong size of loadOrdinals array: expected %d, actual %d |
87a63fff | 643 | Wrong syntax (suid) fd script name "%s" |
5f2c6f7e | 644 | 'X' outside of string in %s |
87a63fff | 645 | 'X' outside of string in unpack |
beb1a06e | 646 | Zero length \N{} in regex; marked by <-- HERE in m/%s/ |
62f5f54d FC |
647 | |
648 | __CATEGORIES__ | |
649 | Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches succeed | |
650 | Code point 0x%X is not Unicode, may not be portable | |
651 | Illegal character \%o (carriage return) | |
652 | Missing argument in %s | |
653 | Unicode non-character U+%X is illegal for open interchange | |
654 | Operation "%s" returns its argument for non-Unicode code point 0x%X | |
655 | Operation "%s" returns its argument for UTF-16 surrogate U+%X | |
656 | Unicode surrogate U+%X is illegal in UTF-8 | |
657 | UTF-16 surrogate U+%X | |
17d13b54 | 658 | False [] range "%s" in regex; marked by <-- HERE in m/%s/ |