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

Function TestPromptNonInteractiveSelect_EOF

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

Source from the content-addressed store, hash-verified

798}
799
800func TestPromptNonInteractiveSelect_EOF(t *testing.T) {
801 opts := []struct{ label, value string }{{"Option A", "a"}}
802 scanner := newScannerFromString("") // empty = EOF immediately
803 _, err := promptNonInteractiveSelect(scanner, "Pick one", opts)
804 if err == nil {
805 t.Fatal("expected error on EOF, got nil")
806 }
807}
808
809func TestPromptNonInteractiveMultiSelect_ByNumber(t *testing.T) {
810 opts := []struct{ label, value string }{

Callers

nothing calls this directly

Calls 2

newScannerFromStringFunction · 0.85

Tested by

no test coverage detected