From: Russ Cox Date: Sun, 20 Jun 2010 19:05:43 +0000 (-0700) Subject: errchk: fix build - allow matches in multiline error messages X-Git-Tag: weekly.2010-06-21~11 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=37c531f51fe20a81f911f9b218e5d0125f91ec11;p=gostls13.git errchk: fix build - allow matches in multiline error messages TBR=r CC=golang-dev https://golang.org/cl/1734042 --- 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) {