1[short] skip 2 3go test xtestonly 4! stdout '^ok.*\[no tests to run\]' 5stdout '^ok' 6 7-- go.mod -- 8module xtestonly 9 10go 1.16 11-- f.go -- 12package xtestonly 13 14func F() int { return 42 } 15-- f_test.go -- 16package xtestonly_test 17 18import ( 19 "testing" 20 "xtestonly" 21) 22 23func TestF(t *testing.T) { 24 if x := xtestonly.F(); x != 42 { 25 t.Errorf("f.F() = %d, want 42", x) 26 } 27}