(t *testing.T)
| 150 | } |
| 151 | |
| 152 | func TestResolveInputFlags_FileNotFound(t *testing.T) { |
| 153 | dir := t.TempDir() |
| 154 | cmdutil.TestChdir(t, dir) |
| 155 | |
| 156 | rctx := newTestRuntimeWithStdin(map[string]string{"markdown": "@nonexistent.md"}, "") |
| 157 | flags := []Flag{{Name: "markdown", Input: []string{File, Stdin}}} |
| 158 | |
| 159 | err := resolveInputFlags(rctx, flags) |
| 160 | if err == nil { |
| 161 | t.Fatal("expected error for missing file") |
| 162 | } |
| 163 | vErr := assertValidationParam(t, err, "--markdown") |
| 164 | if !strings.Contains(vErr.Message, "cannot read file") { |
| 165 | t.Errorf("unexpected error message: %q", vErr.Message) |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | func TestResolveInputFlags_EmptyFilePath(t *testing.T) { |
| 170 | rctx := newTestRuntimeWithStdin(map[string]string{"markdown": "@ "}, "") |
nothing calls this directly
no test coverage detected