TestCmdDoAutoWithInjection: --auto --with threads the instruction to the detached supervisor so it can append it to the autonomous prompt.
(t *testing.T)
| 105 | // TestCmdDoAutoWithInjection: --auto --with threads the instruction to the |
| 106 | // detached supervisor so it can append it to the autonomous prompt. |
| 107 | func TestCmdDoAutoWithInjection(t *testing.T) { |
| 108 | setupFlowRoot(t) |
| 109 | seedTask(t, "auto-task") |
| 110 | stubITerm(t) |
| 111 | calls, _, _, _, gotInjection := stubAutoLauncher(t, 4242) |
| 112 | |
| 113 | if rc := cmdDo([]string{"auto-task", "--auto", "--with", "also check the rate limiter"}); rc != 0 { |
| 114 | t.Fatalf("--auto --with rc=%d, want 0", rc) |
| 115 | } |
| 116 | if *calls != 1 { |
| 117 | t.Fatalf("autoLauncher calls = %d, want 1", *calls) |
| 118 | } |
| 119 | if *gotInjection != "also check the rate limiter" { |
| 120 | t.Errorf("injection = %q, want the --with text", *gotInjection) |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | // TestAutoExecAppendsInjection: cmdAutoExec, given a --with instruction, |
| 125 | // appends the marker + instruction to the prompt it hands to claude. |
nothing calls this directly
no test coverage detected