(t *testing.T)
| 824 | } |
| 825 | |
| 826 | func TestPromptNonInteractiveMultiSelect_ByValue(t *testing.T) { |
| 827 | opts := []struct{ label, value string }{ |
| 828 | {"github tools", "github"}, |
| 829 | {"edit tools", "edit"}, |
| 830 | {"bash tools", "bash"}, |
| 831 | } |
| 832 | |
| 833 | scanner := newScannerFromString("edit,bash") |
| 834 | got, err := promptNonInteractiveMultiSelect(scanner, "Pick tools", opts) |
| 835 | if err != nil { |
| 836 | t.Fatalf("unexpected error: %v", err) |
| 837 | } |
| 838 | if len(got) != 2 || got[0] != "edit" || got[1] != "bash" { |
| 839 | t.Errorf("got %v, want [edit bash]", got) |
| 840 | } |
| 841 | } |
| 842 | |
| 843 | func TestPromptNonInteractiveMultiSelect_Empty(t *testing.T) { |
| 844 | opts := []struct{ label, value string }{{"Option A", "a"}} |
nothing calls this directly
no test coverage detected