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)
| 195 | // FLOW_TERM, matching ZELLIJ's behavior. Rationale: if the user is |
| 196 | // inside kitty, that's where their workflow lives. |
| 197 | func 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. |