-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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#23920. Change-Id: I82eff23e24b83dae183c0cf9f85fc5f409f51c25 Reviewed-on: https://go-review.googlesource.com/98445 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{"Action":"run","Test":"TestWithColons"} | ||
{"Action":"output","Test":"TestWithColons","Output":"=== RUN TestWithColons\n"} | ||
{"Action":"run","Test":"TestWithColons/[::1]"} | ||
{"Action":"output","Test":"TestWithColons/[::1]","Output":"=== RUN TestWithColons/[::1]\n"} | ||
{"Action":"run","Test":"TestWithColons/127.0.0.1:0"} | ||
{"Action":"output","Test":"TestWithColons/127.0.0.1:0","Output":"=== RUN TestWithColons/127.0.0.1:0\n"} | ||
{"Action":"output","Test":"TestWithColons","Output":"--- PASS: TestWithColons (0.00s)\n"} | ||
{"Action":"output","Test":"TestWithColons/[::1]","Output":" --- PASS: TestWithColons/[::1] (0.00s)\n"} | ||
{"Action":"pass","Test":"TestWithColons/[::1]"} | ||
{"Action":"output","Test":"TestWithColons/127.0.0.1:0","Output":" --- PASS: TestWithColons/127.0.0.1:0 (0.00s)\n"} | ||
{"Action":"pass","Test":"TestWithColons/127.0.0.1:0"} | ||
{"Action":"pass","Test":"TestWithColons"} | ||
{"Action":"output","Output":"PASS\n"} | ||
{"Action":"pass"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
=== RUN TestWithColons | ||
=== RUN TestWithColons/[::1] | ||
=== RUN TestWithColons/127.0.0.1:0 | ||
--- PASS: TestWithColons (0.00s) | ||
--- PASS: TestWithColons/[::1] (0.00s) | ||
--- PASS: TestWithColons/127.0.0.1:0 (0.00s) | ||
PASS |