]> git.sur5r.net Git - i3/i3/blob - testcases/t/181-regress-float-border.t
config parser: recover after invalid input
[i3/i3] / testcases / t / 181-regress-float-border.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • http://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Regression test: Changing border style should not have an impact on the size
18 # (geometry) of the child window. See ticket http://bugs.i3wm.org/561
19 # Wrong behaviour manifested itself up to (including) commit
20 # d805d1bbeaf89e11f67c981f94c9f55bbb4b89d9
21 #
22 use i3test;
23 use Data::Dumper;
24
25 fresh_workspace;
26
27 my $win = open_floating_window(rect => [10, 10, 200, 100]);
28
29 my $geometry = $win->rect;
30 is($geometry->{width}, 200, 'width correct');
31 is($geometry->{height}, 100, 'height correct');
32
33 cmd 'border 1pixel';
34
35 $geometry = $win->rect;
36 is($geometry->{width}, 200, 'width correct');
37 is($geometry->{height}, 100, 'height correct');
38
39 done_testing;