MCPcopy
hub / github.com/larksuite/cli / TestResolveInputFlags_EmptyInput

Function TestResolveInputFlags_EmptyInput

shortcuts/common/runner_input_test.go:99–109  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

97}
98
99func TestResolveInputFlags_EmptyInput(t *testing.T) {
100 rctx := newTestRuntimeWithStdin(map[string]string{"markdown": ""}, "")
101 flags := []Flag{{Name: "markdown", Input: []string{File, Stdin}}}
102
103 if err := resolveInputFlags(rctx, flags); err != nil {
104 t.Fatalf("unexpected error: %v", err)
105 }
106 if got := rctx.Str("markdown"); got != "" {
107 t.Errorf("expected empty, got %q", got)
108 }
109}
110
111func TestResolveInputFlags_NoInputSpec(t *testing.T) {
112 rctx := newTestRuntimeWithStdin(map[string]string{"token": "@something"}, "")

Callers

nothing calls this directly

Calls 3

newTestRuntimeWithStdinFunction · 0.85
resolveInputFlagsFunction · 0.85
StrMethod · 0.65

Tested by

no test coverage detected