From 37c531f51fe20a81f911f9b218e5d0125f91ec11 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 20 Jun 2010 12:05:43 -0700 Subject: [PATCH] errchk: fix build - allow matches in multiline error messages TBR=r CC=golang-dev https://golang.org/cl/1734042 --- test/errchk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/errchk b/test/errchk index 3aafddb82d..115aa7be09 100755 --- a/test/errchk +++ b/test/errchk @@ -31,7 +31,12 @@ close(SRC); # Run command $cmd = join(' ', @ARGV); open(CMD, "exec $cmd &1 |") || die "BUG: errchk: run $cmd: $!"; -@out = grep { !/^ / } ; + +# 6g error messages continue onto additional lines with leading tabs. +# Split the output at the beginning of each line that doesn't begin with a tab. +$out = join('', ); +@out = split(/^(?!\t)/m, $out); + close CMD; if($? == 0) {