(t *testing.T)
| 285 | } |
| 286 | |
| 287 | func TestAdd_EmptyDirectory(t *testing.T) { |
| 288 | tmpDir := t.TempDir() |
| 289 | resetAddFlags() |
| 290 | taskDir = tmpDir |
| 291 | |
| 292 | output, err := captureAddOutput(t, "First task ever") |
| 293 | if err != nil { |
| 294 | t.Fatalf("unexpected error: %v", err) |
| 295 | } |
| 296 | |
| 297 | if !strings.Contains(output, "Created task 001") { |
| 298 | t.Errorf("expected ID 001 for first task, got: %s", output) |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | func TestAdd_SequentialIDs(t *testing.T) { |
| 303 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected