From 2a792eb24810033314f675b4e65efbdd9348b706 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 6 Aug 2011 17:42:38 +0200 Subject: [PATCH] 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'. --- ChangeLog | 7 +++++++ lib/tap-driver | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b44766c6b..e07ef47ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-08-06 Stefano Lattarini + + 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 tap: fix typo in TAP driver version message diff --git a/lib/tap-driver b/lib/tap-driver index 91edd1e05..d59ae01ea 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 ""; -- 2.47.2