diff --git a/testdata/scripts/test.txt b/testdata/scripts/test.txt index e0e24d9..9b0482b 100644 --- a/testdata/scripts/test.txt +++ b/testdata/scripts/test.txt @@ -2,11 +2,12 @@ exec go test -v stdout 'PASS.*TestFoo' garble test -c -vet=off -bingrep bar.test$exe 'TestFoo' +bingrep bar.test$exe 'TestFoo' 'TestSeparateFoo' ! bingrep bar.test$exe 'ImportedVar' exec ./bar.test -test.v stdout 'PASS.*TestFoo' +stdout 'PASS.*TestSeparateFoo' -- go.mod -- module foo.com/bar @@ -29,3 +30,18 @@ func TestFoo(t *testing.T) { t.FailNow() } } +-- bar_separate_test.go -- +package bar_test + +import ( + "testing" + + "foo.com/bar" +) + +func TestSeparateFoo(t *testing.T) { + t.Log(bar.ImportedVar) + if bar.Foo() != "Foo" { + t.FailNow() + } +}