1 go test -v -run Test -skip T skip_test.go
2 ! stdout RUN
3 stdout '^ok.*\[no tests to run\]'
4
5 go test -v -skip T skip_test.go
6 ! stdout RUN
7
8 go test -v -skip 1 skip_test.go
9 ! stdout Test1
10 stdout RUN.*Test2
11 stdout RUN.*Test2/3
12
13 go test -v -skip 2/3 skip_test.go
14 stdout RUN.*Test1
15 stdout RUN.*Test2
16 stdout RUN.*ExampleTest1
17 ! stdout Test2/3
18
19 go test -v -skip 2/4 skip_test.go
20 stdout RUN.*Test1
21 stdout RUN.*Test2
22 stdout RUN.*Test2/3
23 stdout RUN.*ExampleTest1
24
25 go test -v -skip Example skip_test.go
26 stdout RUN.*Test1
27 stdout RUN.*Test2
28 stdout RUN.*Test2/3
29 ! stdout ExampleTest1
30
31 -- skip_test.go --
32 package skip_test
33
34 import "testing"
35
36 func Test1(t *testing.T) {
37 }
38
39 func Test2(t *testing.T) {
40 t.Run("3", func(t *testing.T) {})
41 }
42
43 func ExampleTest1() {
44 // Output:
45 }
46
View as plain text