(t *testing.T)
| 68 | } |
| 69 | |
| 70 | func TestRunNewRejectsInvalidName(t *testing.T) { |
| 71 | tmpDir := t.TempDir() |
| 72 | |
| 73 | opts := NewOptions{ |
| 74 | Name: "invalid name with space", |
| 75 | BaseDir: tmpDir, |
| 76 | } |
| 77 | |
| 78 | err := RunNew(opts) |
| 79 | if err == nil { |
| 80 | t.Error("Expected error for invalid name") |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | func TestRunNewCleansUpEmptyDirOnCancel(t *testing.T) { |
| 85 | tmpDir := t.TempDir() |