In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/fb177060d22211d76166a17b30fa8fd7880b2d76?hp=3ab64bae9b914de9eb939a6995f6ef94385e1221>
- Log ----------------------------------------------------------------- commit fb177060d22211d76166a17b30fa8fd7880b2d76 Author: Karl Williamson <[email protected]> Date: Thu Dec 26 21:43:07 2013 -0700 lib/diagnostics.t: Add test This adds a test so that both =item lines of an adjacent pair get tested. M lib/diagnostics.t commit f2cccb4cefe1541dfd66bc2d96a910470a478ebb Author: Karl Williamson <[email protected]> Date: Thu Dec 26 21:50:28 2013 -0700 lib/diagnostics.t: Use different test data This is testing that things work for two adjacent =item lines in perldiag.pod that share the same description. However a future commit will change perldiag.pod so that one of the specific adjacent lines previously used here will be removed. Therefore, choose a different set of adjacent lines that aren't scheduled to be changed. This adds a comment in perldiag that the newly chosen adjacent lines are thus used in diagnostics.t M lib/diagnostics.t M pod/perldiag.pod ----------------------------------------------------------------------- Summary of changes: lib/diagnostics.t | 11 ++++++++--- pod/perldiag.pod | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/diagnostics.t b/lib/diagnostics.t index 0328522..367424e 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(28); + plan(29); } BEGIN { @@ -48,9 +48,14 @@ like $warning, qr/lex_stuff_pvn or similar/, 'L<foo|bar/baz>'; # Multiple messages with the same description seek STDERR, 0,0; $warning = ''; -warn 'Code point 0xBEE5 is not Unicode, may not be portable'; -like $warning, qr/S utf8/, +warn 'Deep recursion on anonymous subroutine'; +like $warning, qr/W recursion/, 'Message sharing its description with the following message'; +seek STDERR, 0,0; +$warning = ''; +warn 'Deep recursion on subroutine "foo"'; +like $warning, qr/W recursion/, + 'Message sharing its description with the preceding message'; # Periods at end of entries in perldiag.pod get matched correctly seek STDERR, 0,0; diff --git a/pod/perldiag.pod b/pod/perldiag.pod index bf05f2b..0b3c096 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1578,6 +1578,10 @@ valid magic number. you have also specified an explicit size for the string. See L<perlfunc/pack>. +=for comment +The following are used in lib/diagnostics.t for testing two =items that +share the same description. Changes here need to be propagated to there + =item Deep recursion on anonymous subroutine =item Deep recursion on subroutine "%s" -- Perl5 Master Repository
