import re from hqt.config import Settings def test_tui_window_name_distinct_from_session_windows(): """The main TUI window name must not collide with the 'hqt-{id}' harness session-window pattern, so the tmux status bar can't read it as a truncated session name (the trailing '-' there is tmux's last-window flag, not a name).""" s = Settings() # Session windows are named hqt-1, hqt-2, ... The main window must differ. assert not re.fullmatch(r"hqt(-\d+)?", s.tui_window_name) assert s.tui_window_name != "hqt" assert s.tui_window_name == "⌂ HQT" def test_tui_session_name_is_short_for_status_left(): """tmux's default status-left prints "[#{session_name}] " in the lower-left corner; the session name should be the clean "hqt", not "hqt-main".""" assert Settings().tui_session_name == "hqt"