TestDetectFlowTermInvalidFallsThrough — an unrecognized FLOW_TERM value is silently ignored and TERM_PROGRAM detection takes over.
(t *testing.T)
| 209 | // TestDetectFlowTermInvalidFallsThrough — an unrecognized FLOW_TERM |
| 210 | // value is silently ignored and TERM_PROGRAM detection takes over. |
| 211 | func 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. |