diff options
author | Matthew Horsfall (alh) <wolfsage@gmail.com> | 2012-12-16 18:02:43 -0500 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-12-22 17:49:22 -0800 |
commit | 6fbc9859e2a15bb1e2ff4bb4670a3b658adc98f3 (patch) | |
tree | f727fff9cbf043833a78da5121a242a92f44156d /lib/diagnostics.t | |
parent | b0d8935dc76d6c1fa67623a77c8a0cbcd27f8283 (diff) | |
download | perl-6fbc9859e2a15bb1e2ff4bb4670a3b658adc98f3.tar.gz |
RT-89642 - Don't treat ,; as special end-of-line characters.
Support multi-line "=item ..." expressions per the POD spec.
This also allows warnings with white-space differences to match.
Diffstat (limited to 'lib/diagnostics.t')
-rw-r--r-- | lib/diagnostics.t | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/lib/diagnostics.t b/lib/diagnostics.t index b6deb2023d..34ea36c6ff 100644 --- a/lib/diagnostics.t +++ b/lib/diagnostics.t @@ -4,7 +4,7 @@ BEGIN { chdir '..' if -d '../pod' && -d '../t'; @INC = 'lib'; require './t/test.pl'; - plan(20); + plan(24); } BEGIN { @@ -96,6 +96,39 @@ like $warning, qr/You tried to load a file.*Perl could not compile/s, 'multiline errors'; +# Multiline entry in perldiag.pod +seek STDERR, 0,0; +$warning = ''; +warn "Using just the first character returned by \\N{} in character class in regex; marked by <-- HERE in m/%s/"; +like $warning, + qr/A charnames handler may return a sequence/s, + 'multi-line entries in perldiag.pod match'; + +# ; at end of entry in perldiag.pod +seek STDERR, 0,0; +$warning = ''; +warn "Perl folding rules are not up-to-date for 0xa; please use the perlbug utility to report;"; +like $warning, + qr/regular expression folding rules/s, + '; works at the end of entries in perldiag.pod'; + +# Differences in spaces in warnings (Why not be nice and accept them?) +seek STDERR, 0,0; +$warning = ''; +warn "Assignment to both a list and a scalar\n"; +like $warning, + qr/2nd and 3rd/s, + 'spaces in warnings are matched lightly'; + +# Differences in spaces in warnings with a period at the end +seek STDERR, 0,0; +$warning = ''; +warn "perl: warning: Setting locale failed.\n"; +like $warning, + qr/The whole warning/s, + 'spaces in warnings with periods at the end are matched lightly'; + + *STDERR = $old_stderr; # These tests use a panic under the hope that the description is not likely |