]> git.sur5r.net Git - i3/i3/blob - testcases/t/01-tile.t
Add testcases :-)
[i3/i3] / testcases / t / 01-tile.t
1 #!perl
2
3 use Test::More tests => 4;
4 use Test::Deep;
5 use X11::XCB qw(:all);
6 use Data::Dumper;
7
8 BEGIN {
9         use_ok('X11::XCB::Window');
10 }
11
12 X11::XCB::Connection->connect(':0');
13
14 my $original_rect = X11::XCB::Rect->new(x => 0, y => 0, width => 30, height => 30);
15
16 my $window = X11::XCB::Window->new(
17                 class => WINDOW_CLASS_INPUT_OUTPUT,
18                 rect => $original_rect,
19                 #override_redirect => 1,
20                 background_color => 12632256
21 );
22
23 isa_ok($window, 'X11::XCB::Window');
24
25 is_deeply($window->rect, $original_rect, "rect unmodified before mapping");
26
27 $window->create;
28 $window->map;
29
30 my $new_rect = $window->rect;
31 ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned");
32
33 diag( "Testing i3, Perl $], $^X" );