Skip to content

Commit a31c660

Browse files
committed
teamocil layouts test
1 parent 890d974 commit a31c660

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

tmuxp/testsuite/test_config_teamocil.py

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,93 @@ def test_config_to_dict(self):
167167
self.assertDictEqual(yaml_to_dict, self.teamocil_dict)
168168

169169

170+
class TeamocilLayoutsTest(unittest.TestCase):
171+
172+
'''
173+
174+
https://github.com/remiprev/teamocil/blob/master/spec/fixtures/layouts.yml
175+
176+
LICENSE: https://github.com/remiprev/teamocil/blob/master/LICENSE
177+
'''
178+
179+
teamocil_yaml = """\
180+
# Simple two windows layout
181+
two-windows:
182+
windows:
183+
- name: "foo"
184+
clear: true
185+
root: "/foo"
186+
layout: "tiled"
187+
panes:
188+
- cmd: "echo 'foo'"
189+
- cmd: "echo 'foo again'"
190+
- name: "bar"
191+
root: "/bar"
192+
splits:
193+
- cmd:
194+
- "echo 'bar'"
195+
- "echo 'bar in an array'"
196+
target: bottom-right
197+
- cmd: "echo 'bar again'"
198+
focus: true
199+
width: 50
200+
201+
# Simple two windows layout with filters
202+
two-windows-with-filters:
203+
windows:
204+
- name: "foo"
205+
root: "/foo"
206+
filters:
207+
before:
208+
- "echo first before filter"
209+
- "echo second before filter"
210+
after:
211+
- "echo first after filter"
212+
- "echo second after filter"
213+
panes:
214+
- cmd: "echo 'foo'"
215+
- cmd: "echo 'foo again'"
216+
width: 50
217+
218+
two-windows-with-custom-command-options:
219+
windows:
220+
- name: "foo"
221+
cmd_separator: "\n"
222+
with_env_var: false
223+
clear: true
224+
root: "/foo"
225+
layout: "tiled"
226+
panes:
227+
- cmd: "echo 'foo'"
228+
- cmd: "echo 'foo again'"
229+
- name: "bar"
230+
cmd_separator: " && "
231+
with_env_var: true
232+
root: "/bar"
233+
splits:
234+
- cmd:
235+
- "echo 'bar'"
236+
- "echo 'bar in an array'"
237+
target: bottom-right
238+
- cmd: "echo 'bar again'"
239+
focus: true
240+
width: 50
241+
242+
three-windows-within-a-session:
243+
session:
244+
name: "my awesome session"
245+
windows:
246+
- name: "first window"
247+
panes:
248+
- cmd: "echo 'foo'"
249+
- name: "second window"
250+
panes:
251+
- cmd: "echo 'foo'"
252+
- name: "third window"
253+
panes:
254+
- cmd: "echo 'foo'"
255+
"""
256+
257+
170258
if __name__ == '__main__':
171259
unittest.main()

0 commit comments

Comments
 (0)