]> git.sur5r.net Git - i3/i3/blob - testcases/t/254-move-to-output-with-criteria.t
libi3: validate UTF8 strings
[i3/i3] / testcases / t / 254-move-to-output-with-criteria.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 # 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;
21 # i3 config file (v4)
22 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
23
24 fake-outputs 800x600+0+0,800x600+800+0,800x600+0+600,800x600+800+600
25 EOT
26
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);
31
32 cmd "workspace " . $ws_top_left;
33 open_window(wm_class => 'moveme');
34 cmd "workspace " . $ws_bottom_left;
35 open_window(wm_class => 'moveme');
36
37 cmd '[class="moveme"] move window to output right';
38
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');
43
44 done_testing;