TestScriptBodyExecReplaces — the final non-empty line is exec, so bash is replaced by the command process. No orphan bash, clean ^C.
(t *testing.T)
| 184 | // TestScriptBodyExecReplaces — the final non-empty line is exec, so |
| 185 | // bash is replaced by the command process. No orphan bash, clean ^C. |
| 186 | func TestScriptBodyExecReplaces(t *testing.T) { |
| 187 | s := newWarpStubs(t) |
| 188 | |
| 189 | if err := SpawnTab("t", "/tmp", "claude", nil); err != nil { |
| 190 | t.Fatalf("SpawnTab: %v", err) |
| 191 | } |
| 192 | |
| 193 | body := s.writeCalls[0] |
| 194 | // Last non-empty line. |
| 195 | lines := strings.Split(strings.TrimRight(body, "\n"), "\n") |
| 196 | last := lines[len(lines)-1] |
| 197 | if !strings.HasPrefix(last, "exec ") { |
| 198 | t.Errorf("last line = %q, want it to start with `exec `", last) |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | // TestAppleScriptHasWasRunningBranch — the keystroke AppleScript |
| 203 | // contains the warm/cold delay branch and keystrokes `bash <path>` |
nothing calls this directly
no test coverage detected