This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
diag.t: Support multiline perldiag entries better
authorFather Chrysostomos <sprout@cpan.org>
Sun, 17 Nov 2013 14:32:02 +0000 (06:32 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 17 Nov 2013 21:08:59 +0000 (13:08 -0800)
I.e., don’t require a space before the newline.

t/porting/diag.t

index 146d626..bee1e4c 100644 (file)
@@ -79,7 +79,7 @@ while (<$diagfh>) {
         last;
       }
 
-      $cur_entry .= $_;
+      $cur_entry =~ s/ ?\z/ $_/;
     }
 
     $cur_entry =~ s/\n/ /gs; # Fix multi-line headers if they have \n's