55import logging
66
77from libtmux import Server
8+ from libtmux .common import has_gte_version
89
910logger = logging .getLogger (__name__ )
1011
@@ -42,8 +43,11 @@ def test_config(server):
4243def test_256_colors (server ):
4344 myserver = Server (colors = 256 )
4445 assert myserver .colors == 256
46+ print (myserver .colors )
4547
46- proc = myserver .cmd ('list-servers' )
48+ proc = myserver .cmd ('list-sessions' )
49+
50+ print ('list-sessions' , proc )
4751
4852 assert '-2' in proc .cmd
4953 assert '-8' not in proc .cmd
@@ -53,7 +57,7 @@ def test_88_colors(server):
5357 myserver = Server (colors = 88 )
5458 assert myserver .colors == 88
5559
56- proc = myserver .cmd ('list-servers ' )
60+ proc = myserver .cmd ('list-sessions ' )
5761
5862 assert '-8' in proc .cmd
5963 assert '-2' not in proc .cmd
@@ -97,4 +101,8 @@ def test_new_session_shell(server):
97101 pane = window .list_panes ()[0 ]
98102 assert mysession .get ("session_name" ) == "test_new_session"
99103 assert server .has_session ("test_new_session" )
100- assert pane .get ('pane_start_command' ) == cmd
104+
105+ if has_gte_version ('3.2' ):
106+ assert pane .get ('pane_start_command' ).replace ('"' , '' ) == cmd
107+ else :
108+ assert pane .get ('pane_start_command' ) == cmd
0 commit comments