From 300288670fe7713da8ae6e4a449d12e6c911b713 Mon Sep 17 00:00:00 2001 From: Lynn Cyrin Date: Thu, 18 Jul 2019 00:20:32 -0700 Subject: [PATCH] add subcommand --- app_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app_test.go b/app_test.go index 5f32483..28c4afc 100644 --- a/app_test.go +++ b/app_test.go @@ -962,6 +962,18 @@ func TestRequiredFlagAppRunBehavior(t *testing.T) { // setup - app app := NewApp() app.Flags = test.flags + app.Commands = []Command{ + Command{ + Name: "command", + Flags: test.flags, + Subcommands: []Command{ + Command{ + Name: "subcommand", + Flags: test.flags, + }, + }, + }, + } // logic under test err := app.Run(test.appRunInput)