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

Function TestDetectFlowTermInvalidFallsThrough

internal/spawner/spawner_test.go:211–221  ·  view source on GitHub ↗

TestDetectFlowTermInvalidFallsThrough — an unrecognized FLOW_TERM value is silently ignored and TERM_PROGRAM detection takes over.

(t *testing.T)

Source from the content-addressed store, hash-verified

209// TestDetectFlowTermInvalidFallsThrough — an unrecognized FLOW_TERM
210// value is silently ignored and TERM_PROGRAM detection takes over.
211func TestDetectFlowTermInvalidFallsThrough(t *testing.T) {
212 t.Setenv("ZELLIJ", "")
213 t.Setenv("KITTY_WINDOW_ID", "")
214 t.Setenv("TERM", "")
215 t.Setenv("FLOW_TERM", "garbage-not-a-backend")
216 t.Setenv("TERM_PROGRAM", "iTerm.app")
217 Override = ""
218 if got := Detect(); got != BackendITerm {
219 t.Errorf("Detect() with garbage FLOW_TERM: got %q, want %q", got, BackendITerm)
220 }
221}
222
223// TestSpawnTabRoutesToITerm asserts the iterm Runner is the one called
224// when Detect() resolves to BackendITerm.

Callers

nothing calls this directly

Calls 1

DetectFunction · 0.85

Tested by

no test coverage detected