MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestScriptBodyExecReplaces

Function TestScriptBodyExecReplaces

internal/warp/warp_test.go:186–200  ·  view source on GitHub ↗

TestScriptBodyExecReplaces — the final non-empty line is exec, so bash is replaced by the command process. No orphan bash, clean ^C.

(t *testing.T)

Source from the content-addressed store, hash-verified

184// TestScriptBodyExecReplaces — the final non-empty line is exec, so
185// bash is replaced by the command process. No orphan bash, clean ^C.
186func 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>`

Callers

nothing calls this directly

Calls 2

newWarpStubsFunction · 0.85
SpawnTabFunction · 0.70

Tested by

no test coverage detected