]> git.sur5r.net Git - i3/i3/blob - testcases/t/147-regress-floatingmove.t
Merge pull request #3475 from Gravemind/fix-i3bar-re-hidden-on-any-modifier
[i3/i3] / testcases / t / 147-regress-floatingmove.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 # Regression test for moving a con outside of a floating con when there are no
18 # tiling cons on a workspace
19 #
20 use i3test;
21
22 sub sync_cmd {
23     cmd @_;
24     sync_with_i3;
25 }
26
27 my $tmp = fresh_workspace;
28
29 my $left = open_window;
30 my $mid = open_window;
31 my $right = open_window;
32
33 # go to workspace level
34 sync_cmd 'focus parent';
35
36 # make it floating
37 sync_cmd 'mode toggle';
38
39 # move the con outside the floating con
40 sync_cmd 'move up';
41
42 does_i3_live;
43
44 # move another con outside
45 sync_cmd '[id="' . $mid->id . '"] focus';
46 sync_cmd 'move up';
47
48 does_i3_live;
49
50 done_testing;