]> git.sur5r.net Git - i3/i3/blob - testcases/t/232-cmd-move-criteria.t
Merge branch 'release-4.10.3'
[i3/i3] / testcases / t / 232-cmd-move-criteria.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • http://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 # Test that the `move [direction]` command works with criteria
18 # Bug still in: 4.8-16-g6888a1f
19 use i3test;
20
21 my $ws = fresh_workspace;
22
23 my $win1 = open_window;
24 my $win2 = open_window;
25 my $win3 = open_window;
26
27 # move win1 from the left to the right
28 cmd '[id="' . $win1->{id} . '"] move right';
29
30 # now they should be switched, with win2 still being focused
31 my $ws_con = get_ws($ws);
32
33 # win2 should be on the left
34 is($ws_con->{nodes}[0]->{window}, $win2->{id}, 'the `move [direction]` command should work with criteria');
35 is($x->input_focus, $win3->{id}, 'it should not disturb focus');
36
37 done_testing;