2011-12-24 15:34:28 +01: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:
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/testsuite.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (or docs/testsuite)
|
|
|
|
#
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/lib-i3test.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (alternatively: perldoc ./testcases/lib/i3test.pm)
|
|
|
|
#
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/ipc.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (or docs/ipc)
|
|
|
|
#
|
|
|
|
# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
|
|
|
|
# (unless you are already familiar with Perl)
|
|
|
|
#
|
2011-12-24 15:34:28 +01:00
|
|
|
# Tests that the provided X-Server to the t/5??-*.t tests is actually providing
|
|
|
|
# multiple monitors.
|
|
|
|
#
|
2017-09-14 12:30:42 +02:00
|
|
|
use i3test i3_config => <<EOT;
|
2012-04-09 14:27:33 +02:00
|
|
|
# i3 config file (v4)
|
|
|
|
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
|
|
|
|
|
|
|
fake-outputs 1024x768+0+0,1024x768+1024+0
|
|
|
|
EOT
|
2011-12-24 15:34:28 +01:00
|
|
|
|
|
|
|
my $i3 = i3(get_socket_path());
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Request tree
|
|
|
|
####################
|
|
|
|
|
|
|
|
my $tree = $i3->get_tree->recv;
|
|
|
|
|
|
|
|
my @outputs = map { $_->{name} } @{$tree->{nodes}};
|
2012-04-09 14:27:33 +02:00
|
|
|
is_deeply(\@outputs, [ '__i3', 'fake-0', 'fake-1' ],
|
2011-12-24 15:34:28 +01:00
|
|
|
'multi-monitor outputs ok');
|
|
|
|
|
2012-04-09 14:27:33 +02:00
|
|
|
|
2011-12-24 15:34:28 +01:00
|
|
|
done_testing;
|