(t *testing.T)
| 150 | } |
| 151 | |
| 152 | func TestLoop_Stop(t *testing.T) { |
| 153 | l := NewLoop("/path/to/prd.json", "test prompt", 5, testProvider) |
| 154 | |
| 155 | l.Stop() |
| 156 | |
| 157 | l.mu.Lock() |
| 158 | stopped := l.stopped |
| 159 | l.mu.Unlock() |
| 160 | |
| 161 | if !stopped { |
| 162 | t.Error("Expected loop to be marked as stopped") |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | // TestLoop_RunWithMockClaude tests the loop with a mock Claude script. |
| 167 | // This is an integration test that requires a Unix-like shell. |