2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • https://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 # Verifies that "move container to output" works correctly when
18 # used with command criteria.
19 # Bug still in: 4.10.4-349-gee5db87
20 use i3test i3_config => <<EOT;
22 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
24 fake-outputs 800x600+0+0,800x600+800+0,800x600+0+600,800x600+800+600
27 my $ws_top_left = fresh_workspace(output => 0);
28 my $ws_top_right = fresh_workspace(output => 1);
29 my $ws_bottom_left = fresh_workspace(output => 2);
30 my $ws_bottom_right = fresh_workspace(output => 3);
32 cmd "workspace " . $ws_top_left;
33 open_window(wm_class => 'moveme');
34 cmd "workspace " . $ws_bottom_left;
35 open_window(wm_class => 'moveme');
37 cmd '[class="moveme"] move window to output right';
39 is_num_children($ws_top_left, 0, 'no containers on the upper left workspace');
40 is_num_children($ws_top_right, 1, 'one container on the upper right workspace');
41 is_num_children($ws_bottom_left, 0, 'no containers on the lower left workspace');
42 is_num_children($ws_bottom_right, 1, 'one container on the lower right workspace');