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

Function TestResolveInputFlags_NoInputSpec

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

Source from the content-addressed store, hash-verified

109}
110
111func TestResolveInputFlags_NoInputSpec(t *testing.T) {
112 rctx := newTestRuntimeWithStdin(map[string]string{"token": "@something"}, "")
113 flags := []Flag{{Name: "token"}} // no Input
114
115 if err := resolveInputFlags(rctx, flags); err != nil {
116 t.Fatalf("unexpected error: %v", err)
117 }
118 // value should be unchanged — no resolution
119 if got := rctx.Str("token"); got != "@something" {
120 t.Errorf("expected %q, got %q", "@something", got)
121 }
122}
123
124func TestResolveInputFlags_StdinNotSupported(t *testing.T) {
125 rctx := newTestRuntimeWithStdin(map[string]string{"data": "-"}, "stdin data")

Callers

nothing calls this directly

Calls 3

newTestRuntimeWithStdinFunction · 0.85
resolveInputFlagsFunction · 0.85
StrMethod · 0.65

Tested by

no test coverage detected