(t *testing.T)
| 807 | } |
| 808 | |
| 809 | func TestPromptNonInteractiveMultiSelect_ByNumber(t *testing.T) { |
| 810 | opts := []struct{ label, value string }{ |
| 811 | {"github tools", "github"}, |
| 812 | {"edit tools", "edit"}, |
| 813 | {"bash tools", "bash"}, |
| 814 | } |
| 815 | |
| 816 | scanner := newScannerFromString("1,3") |
| 817 | got, err := promptNonInteractiveMultiSelect(scanner, "Pick tools", opts) |
| 818 | if err != nil { |
| 819 | t.Fatalf("unexpected error: %v", err) |
| 820 | } |
| 821 | if len(got) != 2 || got[0] != "github" || got[1] != "bash" { |
| 822 | t.Errorf("got %v, want [github bash]", got) |
| 823 | } |
| 824 | } |
| 825 | |
| 826 | func TestPromptNonInteractiveMultiSelect_ByValue(t *testing.T) { |
| 827 | opts := []struct{ label, value string }{ |
nothing calls this directly
no test coverage detected