...

Text file src/cmd/go/testdata/script/test_skip.txt

Documentation: cmd/go/testdata/script

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

View as plain text