# Matches only subtests go test -run Test/Sub standalone_sub_test.go ! stdout '^ok.*\[no tests to run\]' ! stderr '^ok.*\[no tests to run\]' stdout '^ok' -- standalone_sub_test.go -- package standalone_sub_test import "testing" func Test(t *testing.T) { t.Run("Sub", func(t *testing.T) {}) }