(t *testing.T)
| 34 | } |
| 35 | |
| 36 | func TestResolveInputFlags_DirectValue(t *testing.T) { |
| 37 | rctx := newTestRuntimeWithStdin(map[string]string{"markdown": "hello world"}, "") |
| 38 | flags := []Flag{{Name: "markdown", Input: []string{File, Stdin}}} |
| 39 | |
| 40 | if err := resolveInputFlags(rctx, flags); err != nil { |
| 41 | t.Fatalf("unexpected error: %v", err) |
| 42 | } |
| 43 | if got := rctx.Str("markdown"); got != "hello world" { |
| 44 | t.Errorf("expected %q, got %q", "hello world", got) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestResolveInputFlags_Stdin(t *testing.T) { |
| 49 | rctx := newTestRuntimeWithStdin(map[string]string{"markdown": "-"}, "content from stdin") |
nothing calls this directly
no test coverage detected