2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • http://build.i3wm.org/docs/ipc.html
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 # (unless you are already familiar with Perl)
17 # Regression: make a container floating, kill its parent, make it tiling again
21 my $tmp = fresh_workspace;
24 my $left = get_focused($tmp);
26 my $old = get_focused($tmp);
29 my $floating = get_focused($tmp);
30 diag("focused floating: " . get_focused($tmp));
35 cmd qq|[con_id="$old"] focus|;
36 is(get_focused($tmp), $old, 'old container focused');
40 cmd qq|[con_id="$left"] focus|;
41 is(get_focused($tmp), $left, 'old container focused');
44 # focus floating window, make it tiling again
45 cmd qq|[con_id="$floating"] focus|;
46 is(get_focused($tmp), $floating, 'floating window focused');