From dd743f3b55b2f86d9f1f69ef7952ae8ece4de504 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 12 Aug 2012 00:36:44 +0200 Subject: [PATCH] add testcase for previous bugfix (floating window size) --- testcases/t/194-regress-floating-size.t | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 testcases/t/194-regress-floating-size.t 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; -- 2.39.5