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 # Regression: when resizing two containers on a workspace, opening a floating
18 # client, then closing it again, i3 will re-distribute the space on the
19 # workspace as if a tiling container was closed, leading to the containers
20 # taking much more space than they possibly could.
23 use List::Util qw(sum);
25 my $tmp = fresh_workspace;
27 my $first = open_window;
28 my $second = open_window;
30 my ($nodes, $focus) = get_ws_content($tmp);
31 my $old_sum = sum map { $_->{rect}->{width} } @{$nodes};
33 cmd 'resize grow left 10 px or 25 ppt';
38 my $third = open_window;
46 ($nodes, $focus) = get_ws_content($tmp);
47 my $new_sum = sum map { $_->{rect}->{width} } @{$nodes};
49 is($old_sum, $new_sum, 'combined container width is still equal');