(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func TestResolveInput_AtFile_EmptyContent(t *testing.T) { |
| 177 | fio := &localfileio.LocalFileIO{} |
| 178 | dir := t.TempDir() |
| 179 | TestChdir(t, dir) |
| 180 | if err := os.WriteFile("empty.json", []byte(" \n"), 0o600); err != nil { |
| 181 | t.Fatal(err) |
| 182 | } |
| 183 | _, err := ResolveInput("@empty.json", nil, fio) |
| 184 | if err == nil || !strings.Contains(err.Error(), "is empty") { |
| 185 | t.Errorf("expected empty-file error, got: %v", err) |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | func TestResolveInput_AtFile_NoFileIO(t *testing.T) { |
| 190 | // When fileIO is nil, @path must error rather than silently fall back. |
nothing calls this directly
no test coverage detected