lib/diagnostics.t: Add test
authorKarl Williamson <public@khwilliamson.com>
Fri, 27 Dec 2013 04:43:07 +0000 (21:43 -0700)
committerKarl Williamson <public@khwilliamson.com>
Fri, 27 Dec 2013 05:21:54 +0000 (22:21 -0700)
This adds a test so that both =item lines of an adjacent pair get
tested.

lib/diagnostics.t

index d6b6c82..367424e 100644 (file)
@@ -4,7 +4,7 @@ BEGIN {
     chdir '..' if -d '../pod' && -d '../t';
     @INC = 'lib';
     require './t/test.pl';
-    plan(28);
+    plan(29);
 }
 
 BEGIN {
@@ -51,6 +51,11 @@ $warning = '';
 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;