...
Text file
src/cmd/go/testdata/script/test_buildinfo_godebug_issue68053.txt
1[short] skip 'builds test binary'
2
3go list -test -f '{{.ImportPath}} {{.DefaultGODEBUG}}'
4stdout 'example.com/foo\.test.*panicnil=1.*'
5
6go test -c
7go version -m ./foo.test$GOEXE
8stdout 'build\tDefaultGODEBUG=.*panicnil=1.*'
9
10-- go.mod --
11module example.com/foo
12
13go 1.23
14-- main_test.go --
15//go:debug panicnil=1
16package main_test
17
18import (
19 "runtime/debug"
20 "testing"
21)
22
23func TestFoo(t *testing.T) {
24 defer func() {
25 t.Fatal(recover())
26 }()
27
28 t.Log(debug.ReadBuildInfo())
29 panic(nil)
30}
View as plain text