From f5c0bfd181b8f2d2647583f69832e202015cc9e4 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 22 Aug 2009 07:53:34 +0200 Subject: [PATCH] More tests --- testcases/t/04-floating.t | 9 +++++---- testcases/t/08-focus-stack.t | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/testcases/t/04-floating.t b/testcases/t/04-floating.t index 369c656b..b0651241 100644 --- a/testcases/t/04-floating.t +++ b/testcases/t/04-floating.t @@ -1,7 +1,7 @@ #!perl # vim:ts=4:sw=4:expandtab -use Test::More tests => 9; +use Test::More tests => 10; use Test::Deep; use X11::XCB qw(:all); use Data::Dumper; @@ -33,10 +33,11 @@ sleep(0.25); my ($absolute, $top) = $window->rect; -ok($absolute->{width} >= 75, "i3 raised the width to 75"); -ok($absolute->{height} >= 50, "i3 raised the height to 50"); +ok($window->mapped, 'Window is mapped'); +ok($absolute->{width} >= 75, 'i3 raised the width to 75'); +ok($absolute->{height} >= 50, 'i3 raised the height to 50'); -ok($absolute->{x} != 0 && $absolute->{y} != 0, "i3 did not map it to (0x0)"); +ok($absolute->{x} != 0 && $absolute->{y} != 0, 'i3 did not map it to (0x0)'); $window->unmap; diff --git a/testcases/t/08-focus-stack.t b/testcases/t/08-focus-stack.t index e29b3eb7..d88239df 100644 --- a/testcases/t/08-focus-stack.t +++ b/testcases/t/08-focus-stack.t @@ -3,7 +3,7 @@ # Checks if the focus is correctly restored, when creating a floating client # over an unfocused tiling client and destroying the floating one again. -use Test::More tests => 5; +use Test::More tests => 6; use Test::Deep; use X11::XCB qw(:all); use Data::Dumper; @@ -52,6 +52,7 @@ $window->create; $window->map; sleep(0.25); +is(X11::XCB::Connection->input_focus, $window->id, 'floating window focused'); $window->unmap; -- 2.39.5