...

Text file src/cmd/go/testdata/script/test_overlay.txt

Documentation: cmd/go/testdata/script

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

View as plain text