]> git.sur5r.net Git - i3/i3/blob - testcases/t/178-regress-workspace-open.t
Merge branch 'release-4.16.1'
[i3/i3] / testcases / t / 178-regress-workspace-open.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • https://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Tests if empty workspaces are closed when the last child
18 # exits, as long as they're not empty.
19 #
20 use i3test;
21
22 my $i3 = i3(get_socket_path());
23
24 # Get a workspace and open a container
25 my $ws = fresh_workspace;
26 my $con = open_empty_con($i3);
27
28 # Go to a second workspace, kill the container
29 fresh_workspace;
30 cmd "[con_id=\"$con\"] kill";
31
32 # The first workspace should have been closed
33 ok(!workspace_exists($ws), 'workspace closed');
34
35 done_testing;