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

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

View as plain text