Skip to content

Commit 1a6274b

Browse files
committed
Switch workspace builder testsuite to use top
Using `man` will open up the PAGER in BSD. This can be set to `more`, `most` and other things on various POSIX systems. To simplify, just use top here.
1 parent d410642 commit 1a6274b

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

tmuxp/testsuite/workspacebuilder.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class WindowAutomaticRename(TmuxTestCase):
266266
automatic-rename: on
267267
panes:
268268
- shell_command:
269-
- man echo
269+
- top
270270
start_directory: '~'
271271
- shell_command:
272272
- echo "hey"
@@ -301,39 +301,33 @@ def test_automatic_rename_option(self):
301301
self.assertNotEqual(s.get('session_name'), 'tmuxp')
302302
w = s.windows[0]
303303

304-
man_window_name = 'man'
305-
306-
# BSD operating systems will wrap manual pages in less
307-
if 'BSD' in platform.system():
308-
man_window_name = 'less'
309-
310304
for i in range(10):
311305
self.session.server._update_windows()
312-
if w.get('window_name') != man_window_name:
306+
if w.get('window_name') != 'top':
313307
break
314308
time.sleep(.2)
315309

316-
self.assertNotEqual(w.get('window_name'), man_window_name)
310+
self.assertNotEqual(w.get('window_name'), 'top')
317311

318312
pane_base_index = w.show_window_option('pane-base-index', g=True)
319313
w.select_pane(pane_base_index)
320314

321315
for i in range(10):
322316
self.session.server._update_windows()
323-
if w.get('window_name') == man_window_name:
317+
if w.get('window_name') == 'top':
324318
break
325319
time.sleep(.2)
326320

327-
self.assertEqual(w.get('window_name'), text_type(man_window_name))
321+
self.assertEqual(w.get('window_name'), text_type('top'))
328322

329323
w.select_pane('-D')
330324
for i in range(10):
331325
self.session.server._update_windows()
332-
if w['window_name'] != man_window_name:
326+
if w['window_name'] != 'top':
333327
break
334328
time.sleep(.2)
335329

336-
self.assertNotEqual(w.get('window_name'), text_type(man_window_name))
330+
self.assertNotEqual(w.get('window_name'), text_type('top'))
337331

338332

339333
class BlankPaneTest(TmuxTestCase):

0 commit comments

Comments
 (0)