diff --git a/pkg/genericcli/prompt_test.go b/pkg/genericcli/prompt_test.go index f031741..6d27baf 100644 --- a/pkg/genericcli/prompt_test.go +++ b/pkg/genericcli/prompt_test.go @@ -40,6 +40,18 @@ func TestPromptCustom(t *testing.T) { }, want: "Do you get it? [Ack/nack] ", }, + { + name: "custom prompt config, default answer with empty input", + input: "\n", + c: &PromptConfig{ + Message: "Do you get it?", + ShowAnswers: true, + AcceptedAnswers: []string{"ack", "a"}, + DefaultAnswer: "ack", + No: "nack", + }, + want: "Do you get it? [Ack/nack] ", + }, { name: "custom prompt config, default is no answer", input: "ack\n",