]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tap: fix whitespace munging of diagnostic messages
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 6 Aug 2011 15:42:38 +0000 (17:42 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 6 Aug 2011 15:46:34 +0000 (17:46 +0200)
* lib/tap-driver (extract_tap_comment): Pass the `g' flag to the
substitution operator, to strip also trailing whitespaces.  Fixes
a failure in test `tap-whitespace-normalization.test'.

ChangeLog
lib/tap-driver

index b44766c6b4940ed1bab0436f78ca3a39b3963d07..e07ef47ab20d51ab1e7561f669f0b680990eaa1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tap: fix whitespace munging of diagnostic messages
+       * lib/tap-driver (extract_tap_comment): Pass the `g' flag to the
+       substitution operator, to strip also trailing whitespaces.  Fixes
+       a failure in test `tap-whitespace-normalization.test'.
+
 2011-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tap: fix typo in TAP driver version message
index 91edd1e0567d09a3c395222f50e24b3c5f2a60ec..d59ae01ea49db24fc392e84dfd550918af409fa4 100755 (executable)
@@ -356,7 +356,7 @@ sub extract_tap_comment ($)
   local $_ = shift;
   if (/^\Q$diag_string\E(.*)$/o)
     {
-      (my $comment = $1) =~ s/(?:^\s*|\s*$)//;
+      (my $comment = $1) =~ s/(?:^\s*|\s*$)//g;
       return $comment;
     }
   return "";