X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F130-close-empty-split.t;h=d14330887ab51e2b0216aa6b62df352a35c5595c;hb=d1262f2b6ae713266b5a1e8cab368333bb332033;hp=ce9ebd7a16afa79e6dd79f4c0af26d51c68d41bf;hpb=ed2bcc15e384be99225a247435f6cff678e64f0c;p=i3%2Fi3 diff --git a/testcases/t/130-close-empty-split.t b/testcases/t/130-close-empty-split.t index ce9ebd7a..d1433088 100644 --- a/testcases/t/130-close-empty-split.t +++ b/testcases/t/130-close-empty-split.t @@ -1,6 +1,19 @@ #!perl # vim:ts=4:sw=4:expandtab # +# Please read the following documents before working on tests: +# • http://build.i3wm.org/docs/testsuite.html +# (or docs/testsuite) +# +# • http://build.i3wm.org/docs/lib-i3test.html +# (alternatively: perldoc ./testcases/lib/i3test.pm) +# +# • http://build.i3wm.org/docs/ipc.html +# (or docs/ipc) +# +# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf +# (unless you are already familiar with Perl) +# # Check if empty split containers are automatically closed. # use i3test; @@ -22,10 +35,10 @@ my ($nodes, $focus) = get_ws_content($tmp); is($nodes->[0]->{focused}, 0, 'split container not focused'); # focus the split container -cmd 'level up'; +cmd 'focus parent'; ($nodes, $focus) = get_ws_content($tmp); my $split = $focus->[0]; -cmd 'level down'; +cmd 'focus child'; $second = open_empty_con($i3); @@ -40,6 +53,11 @@ cmd 'kill'; ($nodes, $focus) = get_ws_content($tmp); isnt($nodes->[0]->{id}, $split, 'split container closed'); +# clean up the remaining containers to ensure this workspace will be garbage +# collected. +cmd 'kill'; +cmd 'kill'; + ############################################################## # same thing but this time we are moving the cons away instead # of killing them @@ -60,10 +78,10 @@ cmd 'split v'; is($nodes->[0]->{focused}, 0, 'split container not focused'); # focus the split container -cmd 'level up'; +cmd 'focus parent'; ($nodes, $focus) = get_ws_content($tmp); $split = $focus->[0]; -cmd 'level down'; +cmd 'focus child'; $second = open_empty_con($i3);