--- Set command: dry-run ---
(t *testing.T)
| 232 | // --- Set command: dry-run --- |
| 233 | |
| 234 | func TestEdge_Set_DryRunNoWrite(t *testing.T) { |
| 235 | tmpDir := createEdgeCaseTestFiles(t) |
| 236 | resetSetFlags() |
| 237 | taskDir = tmpDir |
| 238 | setTaskID = "001" |
| 239 | setStatus = "completed" |
| 240 | setDryRun = true |
| 241 | defer func() { setDryRun = false }() |
| 242 | |
| 243 | output, err := captureSetOutput(t) |
| 244 | if err != nil { |
| 245 | t.Fatalf("unexpected error: %v", err) |
| 246 | } |
| 247 | |
| 248 | if !strings.Contains(output, "Dry run") { |
| 249 | t.Error("expected 'Dry run' message in output") |
| 250 | } |
| 251 | |
| 252 | // Verify file was NOT changed |
| 253 | content, _ := os.ReadFile(filepath.Join(tmpDir, "001-task.md")) |
| 254 | if strings.Contains(string(content), "status: completed") { |
| 255 | t.Error("expected file NOT to be modified during dry run") |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | // --- Graph: conflicting flags --- |
| 260 |
nothing calls this directly
no test coverage detected