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

Function TestResolveInputFlags_EscapeAtSign

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

Source from the content-addressed store, hash-verified

181}
182
183func TestResolveInputFlags_EscapeAtSign(t *testing.T) {
184 rctx := newTestRuntimeWithStdin(map[string]string{"text": "@@mention someone"}, "")
185 flags := []Flag{{Name: "text", Input: []string{File, Stdin}}}
186
187 if err := resolveInputFlags(rctx, flags); err != nil {
188 t.Fatalf("unexpected error: %v", err)
189 }
190 if got := rctx.Str("text"); got != "@mention someone" {
191 t.Errorf("expected %q, got %q", "@mention someone", got)
192 }
193}
194
195func TestResolveInputFlags_EscapeDoubleAt(t *testing.T) {
196 rctx := newTestRuntimeWithStdin(map[string]string{"text": "@@@triple"}, "")

Callers

nothing calls this directly

Calls 3

newTestRuntimeWithStdinFunction · 0.85
resolveInputFlagsFunction · 0.85
StrMethod · 0.65

Tested by

no test coverage detected