]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/test2json: support subtests containing colons
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 3 Mar 2018 19:53:53 +0000 (19:53 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 10 Mar 2018 10:13:25 +0000 (10:13 +0000)
commit0c5cfec84424bb453ccd270f4b5c439f21ccf617
treeba21570e4127153047ac7e00852b2ddd723fe3b0
parent32409a2dfca955b9a28bb7f581512da8a5beaedc
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 #23920.

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>
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]