diff options
author | Russ Cox <rsc@golang.org> | 2010-06-20 12:05:43 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-06-20 12:05:43 -0700 |
commit | bb021ba13aeaa021db933d0e2552f5c29f80f1a3 (patch) | |
tree | f88692468c3b1043fd71aa8544a0a6b437591f44 | |
parent | 3d434f2574c951249e9b317d3313617963673269 (diff) | |
download | golang-bb021ba13aeaa021db933d0e2552f5c29f80f1a3.tar.gz |
errchk: fix build - allow matches in multiline error messages
TBR=r
CC=golang-dev
http://codereview.appspot.com/1734042
-rwxr-xr-x | test/errchk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/errchk b/test/errchk index 3aafddb82..115aa7be0 100755 --- a/test/errchk +++ b/test/errchk @@ -31,7 +31,12 @@ close(SRC); # Run command $cmd = join(' ', @ARGV); open(CMD, "exec $cmd </dev/null 2>&1 |") || die "BUG: errchk: run $cmd: $!"; -@out = grep { !/^ / } <CMD>; + +# 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('', <CMD>); +@out = split(/^(?!\t)/m, $out); + close CMD; if($? == 0) { |