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

Function TestDetectKittyBeatsFlowTerm

internal/spawner/spawner_test.go:197–207  ·  view source on GitHub ↗

TestDetectKittyBeatsFlowTerm — kitty's per-window markers beat FLOW_TERM, matching ZELLIJ's behavior. Rationale: if the user is inside kitty, that's where their workflow lives.

(t *testing.T)

Source from the content-addressed store, hash-verified

195// FLOW_TERM, matching ZELLIJ's behavior. Rationale: if the user is
196// inside kitty, that's where their workflow lives.
197func TestDetectKittyBeatsFlowTerm(t *testing.T) {
198 t.Setenv("ZELLIJ", "")
199 t.Setenv("KITTY_WINDOW_ID", "42")
200 t.Setenv("TERM", "")
201 t.Setenv("FLOW_TERM", "iterm")
202 t.Setenv("TERM_PROGRAM", "")
203 Override = ""
204 if got := Detect(); got != BackendKitty {
205 t.Errorf("Detect() with KITTY_WINDOW_ID + FLOW_TERM=iterm: got %q, want %q", got, BackendKitty)
206 }
207}
208
209// TestDetectFlowTermInvalidFallsThrough — an unrecognized FLOW_TERM
210// value is silently ignored and TERM_PROGRAM detection takes over.

Callers

nothing calls this directly

Calls 1

DetectFunction · 0.85

Tested by

no test coverage detected