aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/test_xtestonly_works.txt
blob: 01bafb733b58c98878735143a762e876895f123d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[short] skip

go test xtestonly
! stdout '^ok.*\[no tests to run\]'
stdout '^ok'

-- xtestonly/f.go --
package xtestonly

func F() int { return 42 }
-- xtestonly/f_test.go --
package xtestonly_test

import (
	"testing"
	"xtestonly"
)

func TestF(t *testing.T) {
	if x := xtestonly.F(); x != 42 {
		t.Errorf("f.F() = %d, want 42", x)
	}
}