aboutsummaryrefslogtreecommitdiffhomepage
path: root/command/unreachable_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'command/unreachable_test.go')
-rw-r--r--command/unreachable_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/command/unreachable_test.go b/command/unreachable_test.go
index 71408189..9e8c19c9 100644
--- a/command/unreachable_test.go
+++ b/command/unreachable_test.go
@@ -6,15 +6,19 @@ import (
)
func TestParseUnreachable(t *testing.T) {
+ t.Parallel()
+
// top level bypasses name matching and recursive calls to Parse
// returns when encountering zero-length args
t.Run("zero-length args", func(t *testing.T) {
+ t.Parallel()
defer checkRecover(t, "Parse", "attempted to parse with zero length args")
_ = newNode(panicWriter{}, nil, " ", " ").Parse(nil)
})
// top level must not have siblings
t.Run("toplevel siblings", func(t *testing.T) {
+ t.Parallel()
defer checkRecover(t, "Parse", "invalid toplevel state")
n := newNode(panicWriter{}, nil, " ", "")
n.append(newNode(panicWriter{}, nil, " ", " "))
@@ -23,6 +27,7 @@ func TestParseUnreachable(t *testing.T) {
// a node with descendents must not have a direct handler
t.Run("sub handle conflict", func(t *testing.T) {
+ t.Parallel()
defer checkRecover(t, "Parse", "invalid subcommand tree state")
n := newNode(panicWriter{}, nil, " ", " ")
n.adopt(newNode(panicWriter{}, nil, " ", " "))
@@ -32,6 +37,7 @@ func TestParseUnreachable(t *testing.T) {
// this would only happen if a node was matched twice
t.Run("parsed flag set", func(t *testing.T) {
+ t.Parallel()
defer checkRecover(t, "Parse", "invalid set state")
n := newNode(panicWriter{}, nil, " ", "")
set := flag.NewFlagSet("parsed", flag.ContinueOnError)