2011-05-11 20:45:56 +02:00
|
|
|
#!perl
|
|
|
|
# vim:ts=4:sw=4:expandtab
|
|
|
|
#
|
2012-09-10 14:09:01 +02:00
|
|
|
# Please read the following documents before working on tests:
|
|
|
|
# • http://build.i3wm.org/docs/testsuite.html
|
|
|
|
# (or docs/testsuite)
|
|
|
|
#
|
|
|
|
# • http://build.i3wm.org/docs/lib-i3test.html
|
|
|
|
# (alternatively: perldoc ./testcases/lib/i3test.pm)
|
|
|
|
#
|
|
|
|
# • http://build.i3wm.org/docs/ipc.html
|
|
|
|
# (or docs/ipc)
|
|
|
|
#
|
|
|
|
# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
|
|
|
|
# (unless you are already familiar with Perl)
|
|
|
|
#
|
2011-05-11 20:45:56 +02:00
|
|
|
# Regression test to check if borders are correctly restored after an inplace
|
|
|
|
# restart.
|
|
|
|
# found in eb8ad348b28e243cba1972e802ca8ee636472fc9
|
|
|
|
#
|
|
|
|
use List::Util qw(first);
|
|
|
|
use i3test;
|
|
|
|
|
2011-07-25 13:35:56 +02:00
|
|
|
my $i3 = i3(get_socket_path());
|
2011-05-11 20:45:56 +02:00
|
|
|
my $tmp = fresh_workspace;
|
2011-11-22 00:47:32 +01:00
|
|
|
my $window = open_window;
|
2011-05-11 20:45:56 +02:00
|
|
|
|
|
|
|
sub get_border_style {
|
|
|
|
my @content = @{get_ws_content($tmp)};
|
|
|
|
my $wininfo = first { $_->{window} == $window->id } @content;
|
|
|
|
|
|
|
|
return $wininfo->{border};
|
|
|
|
}
|
|
|
|
|
|
|
|
is(get_border_style(), 'normal', 'border style normal');
|
|
|
|
|
|
|
|
cmd 'border 1pixel';
|
|
|
|
|
|
|
|
is(get_border_style(), '1pixel', 'border style 1pixel after changing');
|
|
|
|
|
|
|
|
# perform an inplace-restart
|
|
|
|
cmd 'restart';
|
|
|
|
|
|
|
|
does_i3_live;
|
|
|
|
|
|
|
|
is(get_border_style(), '1pixel', 'border style still 1pixel after restart');
|
|
|
|
|
|
|
|
done_testing;
|