]> Cypherpunks repositories - gostls13.git/commit
cmd/test2json: attribute output to the correct test
authorDaniel Nephin <dnephin@gmail.com>
Mon, 1 Jun 2020 16:11:34 +0000 (16:11 +0000)
committerBryan C. Mills <bcmills@google.com>
Mon, 1 Jun 2020 16:13:47 +0000 (16:13 +0000)
commitf8662a5a96698c5fcf3a77f692e425c7b857e681
treebe6492ecd11e335c7b77a466d326f67d6d659571
parenteecc6282cc9a16a6be439df5540af127477edc32
cmd/test2json: attribute output to the correct test

When printing regular test output check the indentation of the output, and use
the report stack to find the appropriate test name for that output.

This change includes a whitespace change to some golden test files. The
indentation of tests was changed in CL 113177
from tabs to spaces. The golden files have been updated to match the new
output format. The tabs in the golden files cause problems because the indentation check
looks for 4 spaces.

Fixes #29755
Updates #25369

Change-Id: Iebab51816a9755168083a7a665b41497e9dfd85f
GitHub-Last-Rev: 898827f1a6a163fd81dc667f5d27fd4893260038
GitHub-Pull-Request: golang/go#34419
Reviewed-on: https://go-review.googlesource.com/c/go/+/196617
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/internal/test2json/test2json.go
src/cmd/internal/test2json/testdata/issue29755.json [new file with mode: 0644]
src/cmd/internal/test2json/testdata/issue29755.test [new file with mode: 0644]
src/cmd/internal/test2json/testdata/smiley.json
src/cmd/internal/test2json/testdata/smiley.test
src/cmd/internal/test2json/testdata/vet.json
src/cmd/internal/test2json/testdata/vet.test