More tests

This commit is contained in:
Michael Stapelberg 2009-08-22 07:53:34 +02:00
parent c7ba95e79d
commit f5c0bfd181
2 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!perl #!perl
# vim:ts=4:sw=4:expandtab # vim:ts=4:sw=4:expandtab
use Test::More tests => 9; use Test::More tests => 10;
use Test::Deep; use Test::Deep;
use X11::XCB qw(:all); use X11::XCB qw(:all);
use Data::Dumper; use Data::Dumper;
@ -33,10 +33,11 @@ sleep(0.25);
my ($absolute, $top) = $window->rect; my ($absolute, $top) = $window->rect;
ok($absolute->{width} >= 75, "i3 raised the width to 75"); ok($window->mapped, 'Window is mapped');
ok($absolute->{height} >= 50, "i3 raised the height to 50"); 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; $window->unmap;

View File

@ -3,7 +3,7 @@
# Checks if the focus is correctly restored, when creating a floating client # Checks if the focus is correctly restored, when creating a floating client
# over an unfocused tiling client and destroying the floating one again. # 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 Test::Deep;
use X11::XCB qw(:all); use X11::XCB qw(:all);
use Data::Dumper; use Data::Dumper;
@ -52,6 +52,7 @@ $window->create;
$window->map; $window->map;
sleep(0.25); sleep(0.25);
is(X11::XCB::Connection->input_focus, $window->id, 'floating window focused');
$window->unmap; $window->unmap;