File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 88
99from libtmux import exc
1010from libtmux .common import has_gte_version , has_lt_version
11+ from libtmux .constants import WindowDirection
1112from libtmux .pane import Pane
1213from libtmux .server import Server
1314from libtmux .session import Session
@@ -327,3 +328,22 @@ def test_new_window_with_environment_logs_warning_for_old_tmux(
327328 assert any (
328329 "Environment flag ignored" in record .msg for record in caplog .records
329330 ), "Warning missing"
331+
332+
333+ @pytest .mark .skipif (
334+ has_gte_version ("3.1" ),
335+ reason = "Only 3.1 has the -a and -b flag on new-window" ,
336+ )
337+ def test_session_new_window_with_direction_logs_warning_for_old_tmux (
338+ session : Session ,
339+ caplog : pytest .LogCaptureFixture ,
340+ ) -> None :
341+ """Verify new window with direction create a warning if tmux is too old."""
342+ session .new_window (
343+ window_name = "session_window_with_direction" ,
344+ direction = WindowDirection .After ,
345+ )
346+
347+ assert any (
348+ "Direction flag ignored" in record .msg for record in caplog .records
349+ ), "Warning missing"
You can’t perform that action at this time.
0 commit comments