aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/test2json/testdata/issue23920.json
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-03-03 19:53:53 +0000
committerDaniel Martí <mvdan@mvdan.cc>2018-03-10 10:13:25 +0000
commit0c5cfec84424bb453ccd270f4b5c439f21ccf617 (patch)
treeba21570e4127153047ac7e00852b2ddd723fe3b0 /src/cmd/internal/test2json/testdata/issue23920.json
parent32409a2dfca955b9a28bb7f581512da8a5beaedc (diff)
downloadgo-0c5cfec84424bb453ccd270f4b5c439f21ccf617.tar.xz
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>
Diffstat (limited to 'src/cmd/internal/test2json/testdata/issue23920.json')
-rw-r--r--src/cmd/internal/test2json/testdata/issue23920.json14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cmd/internal/test2json/testdata/issue23920.json b/src/cmd/internal/test2json/testdata/issue23920.json
new file mode 100644
index 0000000000..28f7bd56ac
--- /dev/null
+++ b/src/cmd/internal/test2json/testdata/issue23920.json
@@ -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"}