# strip formatting directives from =item line
$header =~ s/[A-Z]<(.*?)>/$1/g;
+ # Since we strip "\.\n" when we search a warning, strip it here as well
+ $header =~ s/\.?$//;
+
my @toks = split( /(%l?[dx]|%c|%(?:\.\d+)?[fs])/, $header );
if (@toks > 1) {
my $conlen = 0;
@INC = 'lib';
}
-use Test::More tests => 6;
+use Test::More tests => 7;
BEGIN { use_ok('diagnostics') }
like $warning, qr/W utf8/,
'Message sharing its description with the following message';
+# Periods at end of entries in perldiag.pod get matched correctly
+seek STDERR, 0,0;
+$warning = '';
+warn "Execution of -e aborted due to compilation errors.\n";
+like $warning, qr/The final summary message/, 'Periods at end of line';