blob: 11c734c4c3fe71cab0655fbf3140a18d6da6f1ec [file] [log] [blame]
# Matches no subtests, parallel
go test -run Test/Sub/ThisWillNotMatch standalone_parallel_sub_test.go
stdout '^ok.*\[no tests to run\]'
-- standalone_parallel_sub_test.go --
package standalone_parallel_sub_test
import "testing"
func Test(t *testing.T) {
ch := make(chan bool, 1)
t.Run("Sub", func(t *testing.T) {
t.Parallel()
<-ch
t.Run("Nested", func(t *testing.T) {})
})
// Ensures that Sub will finish after its t.Run call already returned.
ch <- true
}