mirror of
https://github.com/golang/go
synced 2024-11-26 14:46:47 -07:00
add example test
This commit is contained in:
parent
69c77ee783
commit
e8c3c3460a
10
src/cmd/go/testdata/script/test_skip.txt
vendored
10
src/cmd/go/testdata/script/test_skip.txt
vendored
@ -13,13 +13,19 @@ stdout RUN.*Test2/3
|
||||
go test -v -skip 2/3 skip_test.go
|
||||
stdout RUN.*Test1
|
||||
stdout RUN.*Test2
|
||||
stdout RUN.*ExampleTest1
|
||||
! stdout Test2/3
|
||||
|
||||
go test -v -skip 2/4 skip_test.go
|
||||
stdout RUN.*Test1
|
||||
stdout RUN.*Test2
|
||||
stdout RUN.*Test2/3
|
||||
stdout RUN.*ExampleTest1
|
||||
|
||||
go test -v -skip Example skip_test.go
|
||||
stdout RUN.*Test1
|
||||
stdout RUN.*Test2
|
||||
stdout RUN.*Test2/3
|
||||
|
||||
-- skip_test.go --
|
||||
package skip_test
|
||||
@ -32,3 +38,7 @@ func Test1(t *testing.T) {
|
||||
func Test2(t *testing.T) {
|
||||
t.Run("3", func(t *testing.T) {})
|
||||
}
|
||||
|
||||
func ExampleTest1() {
|
||||
// Output:
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user