MCPcopy Index your code
hub / github.com/codehamr/codehamr / TestCtrlDMidTurnDoesNotQuit

Function TestCtrlDMidTurnDoesNotQuit

internal/tui/tui_test.go:115–125  ·  view source on GitHub ↗

TestCtrlDMidTurnDoesNotQuit: the textarea is empty during a running turn (submit resets it), so without the phase gate a reflexive Ctrl+D would quit instantly, skipping turnCtx cancel and orphaning a running tool's process group. Ctrl+C is the mid-turn escape; Ctrl+D must be inert until idle.

(t *testing.T)

Source from the content-addressed store, hash-verified

113// instantly, skipping turnCtx cancel and orphaning a running tool's process
114// group. Ctrl+C is the mid-turn escape; Ctrl+D must be inert until idle.
115func TestCtrlDMidTurnDoesNotQuit(t *testing.T) {
116 m := newTestModel(t, func(http.ResponseWriter, *http.Request) {})
117 m.phase = phaseThinking
118 if m.ta.Value() != "" {
119 t.Fatal("precondition: textarea empty")
120 }
121 _, cmd := m.Update(tea.KeyMsg{Type: tea.KeyCtrlD})
122 if cmd != nil {
123 t.Fatal("Ctrl+D mid-turn must not quit")
124 }
125}
126
127// TestPlaceholderMentionsTab: placeholder names both "/" and "Tab" as entry
128// points into the popover, so new users discover either way.

Callers

nothing calls this directly

Calls 3

newTestModelFunction · 0.85
ValueMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected