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 # Test that the `move [direction]` command works with criteria
18 # Bug still in: 4.8-16-g6888a1f
21 my $ws = fresh_workspace;
23 my $win1 = open_window;
24 my $win2 = open_window;
25 my $win3 = open_window;
27 # move win1 from the left to the right
28 cmd '[id="' . $win1->{id} . '"] move right';
30 # now they should be switched, with win2 still being focused
31 my $ws_con = get_ws($ws);
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');