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 behavior of "resize <width> <height>" command.
19 # Bug still in: 4.10.2-1-gc0dbc5d
22 ################################################################################
23 # Check that setting floating windows size works
24 ################################################################################
26 my $tmp = fresh_workspace;
30 my @content = @{get_ws($tmp)->{floating_nodes}};
31 is(@content, 1, 'one floating node on this ws');
33 my $oldrect = $content[0]->{rect};
35 cmd 'resize set 100 px 250 px';
37 @content = @{get_ws($tmp)->{floating_nodes}};
38 cmp_ok($content[0]->{rect}->{x}, '==', $oldrect->{x}, 'x untouched');
39 cmp_ok($content[0]->{rect}->{y}, '==', $oldrect->{y}, 'y untouched');
40 cmp_ok($content[0]->{rect}->{width}, '!=', $oldrect->{width}, 'width changed');
41 cmp_ok($content[0]->{rect}->{height}, '!=', $oldrect->{width}, 'height changed');
42 cmp_ok($content[0]->{rect}->{width}, '==', 100, 'width changed to 100 px');
43 cmp_ok($content[0]->{rect}->{height}, '==', 250, 'height changed to 250 px');