You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts/modinfo.txt

33 lines
527 B
Plaintext

env GOPRIVATE=test/main
garble build
exec ./main
cmp stderr main.stderr
! binsubstr main$exe '(devel)'
[short] stop # no need to verify this with -short
exec go build
exec ./main
cmp stderr main.stderr-orig
binsubstr main$exe '(devel)'
-- go.mod --
module test/main
-- main.go --
package main
import "runtime/debug"
func main() {
if info, ok := debug.ReadBuildInfo(); ok {
println("version", info.Main.Version)
} else {
println("no version")
}
}
-- main.stderr-orig --
version (devel)
-- main.stderr --
no version