Text file src/cmd/go/testdata/script/test_overlay.txt
1 cd $WORK/gopath/src/foo 2 go test -list=. -overlay=overlay.json . 3 stdout 'TestBar' 4 5 -- go.mod -- 6 module test.pkg 7 -- foo/foo_test.go -- 8 package foo 9 10 import "testing" 11 12 func TestFoo(t *testing.T) { } 13 -- tmp/bar_test.go -- 14 package foo 15 16 import "testing" 17 18 func TestBar(t *testing.T) { 19 t.Fatal("dummy failure") 20 } 21 -- foo/overlay.json -- 22 {"Replace": {"foo_test.go": "../tmp/bar_test.go"}} 23