From: Michael Stapelberg Date: Sat, 11 Aug 2012 22:36:44 +0000 (+0200) Subject: add testcase for previous bugfix (floating window size) X-Git-Tag: 4.3~110 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dd743f3b55b2f86d9f1f69ef7952ae8ece4de504;p=i3%2Fi3 add testcase for previous bugfix (floating window size) --- diff --git a/testcases/t/194-regress-floating-size.t b/testcases/t/194-regress-floating-size.t new file mode 100644 index 00000000..ccbfaae5 --- /dev/null +++ b/testcases/t/194-regress-floating-size.t @@ -0,0 +1,43 @@ +#!perl +# vim:ts=4:sw=4:expandtab +# Verifies that the size requested by floating windows is set by i3, no matter +# to which value the new_window option is set. +# ticket #770, bug still present in commit ae88accf6fe3817ff42d0d51be1965071194766e +use i3test i3_autostart => 0; + +sub test_with_new_window_value { + my ($value) = @_; + + my $config = < [ 0, 0, 400, 150 ] }); + + my ($absolute, $top) = $window->rect; + + ok($window->mapped, 'Window is mapped'); + cmp_ok($absolute->{width}, '==', 400, 'requested width kept'); + cmp_ok($absolute->{height}, '==', 150, 'requested height kept'); + + exit_gracefully($pid); +} + +test_with_new_window_value(undef); +test_with_new_window_value('1pixel'); +test_with_new_window_value('normal'); +test_with_new_window_value('none'); + +done_testing;