]> git.sur5r.net Git - i3/i3/blob - testcases/t/161-regress-borders-restart.t
Merge branch 'fix-float-close'
[i3/i3] / testcases / t / 161-regress-borders-restart.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Regression test to check if borders are correctly restored after an inplace
5 # restart.
6 # found in eb8ad348b28e243cba1972e802ca8ee636472fc9
7 #
8 use X11::XCB qw(:all);
9 use List::Util qw(first);
10 use i3test;
11
12 my $x = X11::XCB::Connection->new;
13 my $i3 = i3(get_socket_path());
14 my $tmp = fresh_workspace;
15 my $window = open_window($x);
16
17 sub get_border_style {
18     my @content = @{get_ws_content($tmp)};
19     my $wininfo = first { $_->{window} == $window->id } @content;
20
21     return $wininfo->{border};
22 }
23
24 is(get_border_style(), 'normal', 'border style normal');
25
26 cmd 'border 1pixel';
27
28 is(get_border_style(), '1pixel', 'border style 1pixel after changing');
29
30 # perform an inplace-restart
31 cmd 'restart';
32
33 sleep 0.25;
34
35 does_i3_live;
36
37 is(get_border_style(), '1pixel', 'border style still 1pixel after restart');
38
39 done_testing;