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 # Tests that windows inside containers with a single child do not jump
18 # over other containers and erratically move across outputs.
20 # Bug still in: 4.14-63-g75d11820
21 use i3test i3_config => <<EOT;
23 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
25 fake-outputs 640x480+0+0,640x480+640+0
27 workspace left output fake-0
28 workspace right output fake-1
31 cmd 'workspace right';
33 # ┌───────────────────────────┐ ┌───────────────────────────┐
34 # │ Output 1 │ │ Output 2 - splith │
35 # │ │ │┌───────────┐┌────────────┐│
37 # │ │ ││ ││╔══════════╗││
39 # │ (empty workspace) │ ││ first ││║ second ║││
42 # │ │ ││ ││╚══════════╝││
43 # │ │ │└───────────┘└────────────┘│
44 # └───────────────────────────┘ └───────────────────────────┘
46 # Moving "second" left shouldn't cause it to jump over to output 1.
48 my $first = open_window;
49 my $second = open_window;
51 # Put the second window into its own splitv container
54 is_num_children('left', 0, 'No children on left');
55 is_num_children('right', 2, 'Two children on right');
57 # Move the second window to the left
60 is_num_children('left', 0, 'Still no children on left');
61 is_num_children('right', 2, 'Still two children on right');