]> git.sur5r.net Git - i3/i3/blob - testcases/t/161-regress-borders-restart.t
testcases: let i3test.pm export $x, adapt testcases
[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 List::Util qw(first);
9 use i3test;
10
11 my $i3 = i3(get_socket_path());
12 my $tmp = fresh_workspace;
13 my $window = open_window($x);
14
15 sub get_border_style {
16     my @content = @{get_ws_content($tmp)};
17     my $wininfo = first { $_->{window} == $window->id } @content;
18
19     return $wininfo->{border};
20 }
21
22 is(get_border_style(), 'normal', 'border style normal');
23
24 cmd 'border 1pixel';
25
26 is(get_border_style(), '1pixel', 'border style 1pixel after changing');
27
28 # perform an inplace-restart
29 cmd 'restart';
30
31 sleep 0.25;
32
33 does_i3_live;
34
35 is(get_border_style(), '1pixel', 'border style still 1pixel after restart');
36
37 done_testing;