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

Function TestResolveInputFlags_EscapeDoubleAt

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

Source from the content-addressed store, hash-verified

193}
194
195func TestResolveInputFlags_EscapeDoubleAt(t *testing.T) {
196 rctx := newTestRuntimeWithStdin(map[string]string{"text": "@@@triple"}, "")
197 flags := []Flag{{Name: "text", Input: []string{File, Stdin}}}
198
199 if err := resolveInputFlags(rctx, flags); err != nil {
200 t.Fatalf("unexpected error: %v", err)
201 }
202 // @@@ → strip first @, remaining is @@triple which is literal
203 if got := rctx.Str("text"); got != "@@triple" {
204 t.Errorf("expected %q, got %q", "@@triple", got)
205 }
206}
207
208func TestResolveInputFlags_DuplicateStdin(t *testing.T) {
209 rctx := newTestRuntimeWithStdin(map[string]string{"a": "-", "b": "-"}, "data")

Callers

nothing calls this directly

Calls 3

newTestRuntimeWithStdinFunction · 0.85
resolveInputFlagsFunction · 0.85
StrMethod · 0.65

Tested by

no test coverage detected