]> git.sur5r.net Git - i3/i3/commitdiff
tests: add test for ticket #561 (floating window size when changing border)
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 26 Nov 2011 21:19:48 +0000 (21:19 +0000)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 26 Nov 2011 21:20:00 +0000 (21:20 +0000)
testcases/t/181-regress-float-border.t [new file with mode: 0644]

diff --git a/testcases/t/181-regress-float-border.t b/testcases/t/181-regress-float-border.t
new file mode 100644 (file)
index 0000000..f77f780
--- /dev/null
@@ -0,0 +1,26 @@
+#!perl
+# vim:ts=4:sw=4:expandtab
+#
+# Regression test: Changing border style should not have an impact on the size
+# (geometry) of the child window. See ticket http://bugs.i3wm.org/561
+# Wrong behaviour manifested itself up to (including) commit
+# d805d1bbeaf89e11f67c981f94c9f55bbb4b89d9
+#
+use i3test;
+use Data::Dumper;
+
+fresh_workspace;
+
+my $win = open_floating_window(rect => [10, 10, 200, 100]);
+
+my $geometry = $win->rect;
+is($geometry->{width}, 200, 'width correct');
+is($geometry->{height}, 100, 'height correct');
+
+cmd 'border 1pixel';
+
+$geometry = $win->rect;
+is($geometry->{width}, 200, 'width correct');
+is($geometry->{height}, 100, 'height correct');
+
+done_testing;