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

Function TestPromptNonInteractiveMultiSelect_Empty

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

Source from the content-addressed store, hash-verified

841}
842
843func TestPromptNonInteractiveMultiSelect_Empty(t *testing.T) {
844 opts := []struct{ label, value string }{{"Option A", "a"}}
845 scanner := newScannerFromString("")
846 got, err := promptNonInteractiveMultiSelect(scanner, "Pick tools", opts)
847 if err != nil {
848 t.Fatalf("unexpected error on blank input: %v", err)
849 }
850 if len(got) != 0 {
851 t.Errorf("expected empty slice, got %v", got)
852 }
853}
854
855func TestPromptNonInteractiveMultiSelect_Deduplication(t *testing.T) {
856 opts := []struct{ label, value string }{

Callers

nothing calls this directly

Calls 3

newScannerFromStringFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected