]> git.sur5r.net Git - i3/i3/blob - testcases/t/145-flattening.t
Merge branch 'fix-scratchpad-focus'
[i3/i3] / testcases / t / 145-flattening.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # by moving the window in the opposite orientation that its parent has, we
5 # force i3 to create a new split container with the appropriate orientation.
6 # However, when doing that two times in a row, we end up with two split
7 # containers which are then redundant (workspace is horizontal, then v-split,
8 # then h-split – we could just append the children of the latest h-split to the
9 # workspace itself).
10 #
11 # This testcase checks that the tree is properly flattened after moving.
12 #
13 use i3test;
14
15 my $tmp = fresh_workspace;
16
17 my $left = open_window;
18 my $mid = open_window;
19 my $right = open_window;
20
21 cmd 'move up';
22 cmd 'move right';
23 my $ws = get_ws($tmp);
24
25 is($ws->{orientation}, 'horizontal', 'workspace orientation is horizontal');
26 is(@{$ws->{nodes}}, 3, 'all three windows on workspace level');
27
28 done_testing;