automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {test-protocols} tap: fix whitespace munging of diagnostic message


From: Stefano Lattarini
Subject: [FYI] {test-protocols} tap: fix whitespace munging of diagnostic messages
Date: Sat, 6 Aug 2011 17:47:06 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

* 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      |    7 +++++++
 lib/tap-driver |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b44766c..e07ef47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-06  Stefano Lattarini  <address@hidden>
+
+       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  <address@hidden>
 
        tap: fix typo in TAP driver version message
diff --git a/lib/tap-driver b/lib/tap-driver
index 91edd1e..d59ae01 100755
--- a/lib/tap-driver
+++ b/lib/tap-driver
@@ -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 "";
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]