]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10] cmd/internal/test2json: support subtests containing colons
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 3 Mar 2018 19:53:53 +0000 (19:53 +0000)
committerAndrew Bonventre <andybons@golang.org>
Fri, 27 Apr 2018 20:52:45 +0000 (20:52 +0000)
commitf26ed07f53daf19b33e13b3a93f185320d7b9a8b
treefb928c435c8c5ae8f87bf4271223ff640690e219
parent5b6ff694bbc867f4ae95fdc624fb1f4511e5623e
[release-branch.go1.10] cmd/internal/test2json: support subtests containing colons

The "updates" lines, such as RUN, do not contain a colon. However,
test2json looked for one anyway, meaning that it would be thrown off if
it encountered a line like:

=== RUN   TestWithColons/[::1]

In that case, it must not use the first colon it encounters to separate
the action from the test name.

Fixes golang/go#25027

Change-Id: I82eff23e24b83dae183c0cf9f85fc5f409f51c25
Reviewed-on: https://go-review.googlesource.com/98445
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 0c5cfec84424bb453ccd270f4b5c439f21ccf617)
Reviewed-on: https://go-review.googlesource.com/110075
Run-TryBot: Andrew Bonventre <andybons@golang.org>
src/cmd/internal/test2json/test2json.go
src/cmd/internal/test2json/testdata/issue23920.json [new file with mode: 0644]
src/cmd/internal/test2json/testdata/issue23920.test [new file with mode: 0644]