(t *testing.T)
| 181 | } |
| 182 | |
| 183 | func 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 | |
| 195 | func TestResolveInputFlags_EscapeDoubleAt(t *testing.T) { |
| 196 | rctx := newTestRuntimeWithStdin(map[string]string{"text": "@@@triple"}, "") |
nothing calls this directly
no test coverage detected