(t *testing.T)
| 278 | } |
| 279 | |
| 280 | func TestRemoveCmd_Execute_ValidationBeforeInit(t *testing.T) { |
| 281 | // Cleanup. |
| 282 | dirs.RemoveAllForTest() |
| 283 | |
| 284 | remove := &removeCmd{ |
| 285 | celer: nil, // Should not be touched for invalid input. |
| 286 | } |
| 287 | |
| 288 | err := remove.execute([]string{"invalid-package"}) |
| 289 | if err == nil { |
| 290 | t.Fatal("expected validation error") |
| 291 | } |
| 292 | |
| 293 | if !strings.Contains(err.Error(), "invalid package names") { |
| 294 | t.Fatalf("expected validation-first error, got: %v", err) |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | func TestRemoveCmd_GetInstalledPackages(t *testing.T) { |
| 299 | // Cleanup. |
nothing calls this directly
no test coverage detected