summaryrefslogtreecommitdiffstats
path: root/src/cmd/go/testdata/script/test_skip.txt
blob: 94d20b96449086181f059e10de616bfc1b943993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
go test -v -run Test -skip T skip_test.go
! stdout RUN
stdout '^ok.*\[no tests to run\]'

go test -v -skip T skip_test.go
! stdout RUN

go test -v -skip 1 skip_test.go
! stdout Test1
stdout RUN.*Test2
stdout RUN.*Test2/3

go test -v -skip 2/3 skip_test.go
stdout RUN.*Test1
stdout RUN.*Test2
! stdout Test2/3

go test -v -skip 2/4 skip_test.go
stdout RUN.*Test1
stdout RUN.*Test2
stdout RUN.*Test2/3


-- skip_test.go --
package skip_test

import "testing"

func Test1(t *testing.T) {
}

func Test2(t *testing.T) {
	t.Run("3", func(t *testing.T) {})
}