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

     1  # Matches no subtests, but parent test still fails
     2  ! go test -run TestThatFails/ThisWillNotMatch standalone_fail_sub_test.go
     3  ! stdout '^ok.*\[no tests to run\]'
     4  ! stderr '^ok.*\[no tests to run\]'
     5  stdout 'FAIL'
     6  
     7  -- standalone_fail_sub_test.go --
     8  package standalone_fail_sub_test
     9  
    10  import "testing"
    11  
    12  func TestThatFails(t *testing.T) {
    13  	t.Run("Sub", func(t *testing.T) {})
    14  	t.Fail()
    15  }

View as plain text