(t *testing.T)
| 46 | } |
| 47 | |
| 48 | func TestResolveInputFlags_Stdin(t *testing.T) { |
| 49 | rctx := newTestRuntimeWithStdin(map[string]string{"markdown": "-"}, "content from stdin") |
| 50 | flags := []Flag{{Name: "markdown", Input: []string{File, Stdin}}} |
| 51 | |
| 52 | if err := resolveInputFlags(rctx, flags); err != nil { |
| 53 | t.Fatalf("unexpected error: %v", err) |
| 54 | } |
| 55 | if got := rctx.Str("markdown"); got != "content from stdin" { |
| 56 | t.Errorf("expected %q, got %q", "content from stdin", got) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | func TestResolveInputFlags_File(t *testing.T) { |
| 61 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected