Skip to content

Commit

Permalink
One more test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Oct 9, 2024
1 parent b8d6f72 commit 4642746
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/genericcli/prompt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4642746

Please sign in to comment.