Skip to content

Commit 8a3cff8

Browse files
committed
add test for WorkSpaceBuilder window_command option.
1 parent f4aef07 commit 8a3cff8

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
@@ -253,6 +253,31 @@ def test_window_options(self):
253253
window_count += 1
254254
w.select_layout(wconf['layout'])
255255

256+
def test_window_command(self):
257+
yaml_config = """
258+
session_name: test window options
259+
start_directory: '~'
260+
windows:
261+
- layout: main-horizontal
262+
options:
263+
main-pane-height: 5
264+
panes:
265+
- pane
266+
- pane
267+
- pane
268+
window_name: editor
269+
window_command: test_command
270+
"""
271+
s = self.session
272+
sconfig = kaptan.Kaptan(handler='yaml')
273+
sconfig = sconfig.import_config(yaml_config).get()
274+
sconfig = config.expand(sconfig)
275+
276+
builder = WorkspaceBuilder(sconf=sconfig)
277+
278+
wc_config = builder.sconf.get('windows')[0].get('window_command')
279+
self.assertEqual(wc_config, 'test_command')
280+
256281

257282
class EnvironmentVariables(TmuxTestCase):
258283

0 commit comments

Comments
 (0)