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

Function TestPromptNonInteractiveSelect_InvalidValue

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

Source from the content-addressed store, hash-verified

787}
788
789func TestPromptNonInteractiveSelect_InvalidValue(t *testing.T) {
790 opts := []struct{ label, value string }{
791 {"Option A", "a"},
792 }
793 scanner := newScannerFromString("z")
794 _, err := promptNonInteractiveSelect(scanner, "Pick one", opts)
795 if err == nil {
796 t.Fatal("expected error for unknown value, got nil")
797 }
798}
799
800func TestPromptNonInteractiveSelect_EOF(t *testing.T) {
801 opts := []struct{ label, value string }{{"Option A", "a"}}

Callers

nothing calls this directly

Calls 2

newScannerFromStringFunction · 0.85

Tested by

no test coverage detected