(t *testing.T)
| 771 | } |
| 772 | |
| 773 | func TestPromptNonInteractiveSelect_ByValue(t *testing.T) { |
| 774 | opts := []struct{ label, value string }{ |
| 775 | {"copilot option", "copilot"}, |
| 776 | {"claude option", "claude"}, |
| 777 | } |
| 778 | |
| 779 | scanner := newScannerFromString("claude") |
| 780 | got, err := promptNonInteractiveSelect(scanner, "Pick engine", opts) |
| 781 | if err != nil { |
| 782 | t.Fatalf("unexpected error: %v", err) |
| 783 | } |
| 784 | if got != "claude" { |
| 785 | t.Errorf("got %q, want %q", got, "claude") |
| 786 | } |
| 787 | } |
| 788 | |
| 789 | func TestPromptNonInteractiveSelect_InvalidValue(t *testing.T) { |
| 790 | opts := []struct{ label, value string }{ |
nothing calls this directly
no test coverage detected