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 # Check if stacking containers can be used independantly of
18 # the split mode (horizontal/vertical) of the underlying
23 my $i3 = i3(get_socket_path());
25 my $tmp = fresh_workspace;
27 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
29 # Enforce vertical split mode
32 my $first = open_empty_con($i3);
33 my $second = open_empty_con($i3);
35 isnt($first, $second, 'two different containers opened');
37 ##############################################################
38 # change mode to stacking and cycle through the containers
39 ##############################################################
41 cmd 'layout stacking';
42 is(get_focused($tmp), $second, 'second container still focused');
45 is(get_focused($tmp), $first, 'first container focused');
48 is(get_focused($tmp), $second, 'second container focused again');
50 ##############################################################
51 # now change the orientation to horizontal and cycle
52 ##############################################################
59 is(get_focused($tmp), $first, 'first container focused');
62 is(get_focused($tmp), $second, 'second container focused again');