]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: assert on more of the version string in TestScript/gotoolchain
authorBryan C. Mills <bcmills@google.com>
Wed, 19 Apr 2023 19:39:01 +0000 (15:39 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 21 Apr 2023 18:08:08 +0000 (18:08 +0000)
The previous assert triggers whenever the 40-character git commit
contains the substring "999", which happens with a probability
decidedly greater than zero.

For #57001.

Change-Id: If0f1bc1a3dd0e6b7e66768d0cf3a79545ee4e5ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/486399
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/go/testdata/script/gotoolchain.txt

index 0b7b29d04fb9f3a3fb9defe22af47080c8560379..0e763e5caa4e58618f2d986183859b4a89bf83af 100644 (file)
@@ -1,3 +1,4 @@
+[!GOOS:windows] [!exec:/bin/sh] skip
 [!GOOS:windows] chmod 0755 $WORK/bin/go1.999testpath
 [!GOOS:plan9] env PATH=$WORK/bin${:}$PATH
 [GOOS:plan9] env path=$WORK/bin${:}$path
@@ -5,7 +6,7 @@
 
 # Plain go version
 go version
-! stdout 999
+! stdout go1\.999
 
 # GOTOOLCHAIN from PATH
 env GOTOOLCHAIN=go1.999testpath