MCPcopy Create free account
hub / github.com/github/gh-aw / TestPromptNonInteractiveSelect_ByValue

Function TestPromptNonInteractiveSelect_ByValue

pkg/cli/interactive_test.go:773–787  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

771}
772
773func 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
789func TestPromptNonInteractiveSelect_InvalidValue(t *testing.T) {
790 opts := []struct{ label, value string }{

Callers

nothing calls this directly

Calls 3

newScannerFromStringFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected