Skip to content

Commit ae4e55d

Browse files
committed
add test for WorkSpaceBuilder window_command option.
1 parent f137014 commit ae4e55d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tmuxp/testsuite/workspacebuilder.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,31 @@ def test_window_options(self):
311311
window_count += 1
312312
w.select_layout(wconf['layout'])
313313

314+
def test_window_command(self):
315+
yaml_config = """
316+
session_name: test window options
317+
start_directory: '~'
318+
windows:
319+
- layout: main-horizontal
320+
options:
321+
main-pane-height: 5
322+
panes:
323+
- pane
324+
- pane
325+
- pane
326+
window_name: editor
327+
window_command: test_command
328+
"""
329+
s = self.session
330+
sconfig = kaptan.Kaptan(handler='yaml')
331+
sconfig = sconfig.import_config(yaml_config).get()
332+
sconfig = config.expand(sconfig)
333+
334+
builder = WorkspaceBuilder(sconf=sconfig)
335+
336+
wc_config = builder.sconf.get('windows')[0].get('window_command')
337+
self.assertEqual(wc_config, 'test_command')
338+
314339

315340
class EnvironmentVariables(TmuxTestCase):
316341

0 commit comments

Comments
 (0)