(t *testing.T)
| 287 | } |
| 288 | |
| 289 | func TestSet_DoneFlag(t *testing.T) { |
| 290 | tmpDir := createSetTestFiles(t) |
| 291 | resetSetFlags() |
| 292 | taskDir = tmpDir |
| 293 | setTaskID = "001" |
| 294 | setDone = true |
| 295 | |
| 296 | output, err := captureSetOutput(t) |
| 297 | if err != nil { |
| 298 | t.Fatalf("unexpected error: %v", err) |
| 299 | } |
| 300 | |
| 301 | if !strings.Contains(output, "status: pending -> completed") { |
| 302 | t.Errorf("Expected --done to set status to completed, got: %s", output) |
| 303 | } |
| 304 | |
| 305 | content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md")) |
| 306 | if !strings.Contains(string(content), "status: completed") { |
| 307 | t.Error("Expected file to contain completed status") |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | func TestSet_MultipleFields(t *testing.T) { |
| 312 | tmpDir := createSetTestFiles(t) |
nothing calls this directly
no test coverage detected