Skip to content

Commit c81c1c0

Browse files
committed
more
1 parent c3ea1d3 commit c81c1c0

File tree

1 file changed

+86
-6
lines changed

1 file changed

+86
-6
lines changed

tmuxp/testsuite/test_config_teamocil.py

Lines changed: 86 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,18 +262,99 @@ class TeamocilLayoutsTest(unittest.TestCase):
262262
'root': '/root',
263263
'layout': 'tiled',
264264
'panes': [
265-
{ 'cmd': "echo 'foo'" },
266-
{ 'cmd': "echo 'foo again'" }
265+
{'cmd': "echo 'foo'"},
266+
{'cmd': "echo 'foo again'"}
267267
]
268268
},
269-
{
269+
{
270+
'name': 'bar',
271+
'root': '/bar',
272+
'splits': [
273+
{'cmd': [
274+
"echo 'bar'",
275+
"echo 'bar in an array'"
276+
],
277+
'target': 'bottom-right'
278+
},
279+
{'cmd': "echo 'bar again'",
280+
'focus': True,
281+
'width': 50
282+
}
283+
]
284+
285+
}]
286+
},
287+
288+
'two-windows-with-filters': {
289+
'windows': [{
290+
'name': 'foo',
291+
'root': '/foo',
292+
'filters': {
293+
'before': [
294+
'echo first before filter',
295+
'echo second before filter'
296+
],
297+
'after': [
298+
'echo first after filter',
299+
'echo second after filter',
300+
]
301+
},
302+
'panes': [
303+
{ 'cmd': "echo 'foo'" },
304+
{ 'cmd': "echo 'foo again'", 'width': 50 }
305+
]
306+
}]
307+
},
308+
309+
'two-windows-with-custom-command-options': {
310+
'windows': [{
311+
'name': 'foo',
312+
'cmd_separator': '\n',
313+
'with_env_var': False,
314+
'clear': True,
315+
'root': '/foo',
316+
'layout': 'tiled',
317+
'panes': [
318+
{ 'cmd': "echo 'foo'" },
319+
{ 'cmd': "echo 'foo again'" }
320+
]
321+
}, {
270322
'name': 'bar',
323+
'cmd_separator': ' && ',
324+
'with_env_var': True,
271325
'root': '/bar',
272326
'splits': [
273-
327+
{ 'cmd': [
328+
"echo 'bar'",
329+
"echo 'bar in an array'"
330+
]},
331+
{ 'cmd': "echo 'bar again'",
332+
'focus': True,
333+
'width': 50
334+
}
274335
]
275-
276336
}]
337+
},
338+
339+
'three-windows-within-a-session': {
340+
'session': {
341+
'name': 'my awesome session',
342+
'windows': [
343+
{ 'name': 'first window',
344+
'panes': [
345+
{ 'cmd': "echo 'foo'" }
346+
]
347+
}, {
348+
'name': 'second window',
349+
'panes': {
350+
'cmd': "echo 'foo'" }
351+
}, {
352+
'name': 'third window',
353+
'panes': [
354+
{ 'cmd': "echo 'foo'" }
355+
]}
356+
]
357+
}
277358
}
278359
}
279360

@@ -285,6 +366,5 @@ def test_config_to_dict(self):
285366
self.assertDictEqual(yaml_to_dict, self.teamocil_dict)
286367

287368

288-
289369
if __name__ == '__main__':
290370
unittest.main()

0 commit comments

Comments
 (0)