(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestRunStats_InvalidFormat(t *testing.T) { |
| 154 | tmpDir := createStatsTestFiles(t) |
| 155 | resetStatsFlags() |
| 156 | statsFormat = "invalid" |
| 157 | |
| 158 | _, err := captureStatsOutput(t, []string{tmpDir}) |
| 159 | if err == nil { |
| 160 | t.Fatal("expected error for invalid format, got nil") |
| 161 | } |
| 162 | if !strings.Contains(err.Error(), "unsupported format") { |
| 163 | t.Errorf("expected 'unsupported format' error, got: %v", err) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | func TestRunStats_EmptyDir(t *testing.T) { |
| 168 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected