2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • https://build.i3wm.org/docs/ipc.html
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 # (unless you are already familiar with Perl)
17 # Verifies that i3 survives inplace restarts with fullscreen containers
21 my $tmp = fresh_workspace;
23 open_window(name => 'first');
24 open_window(name => 'second');
28 my ($nodes, $focus) = get_ws_content($tmp);
29 is(scalar @$nodes, 2, 'two tiling nodes on workspace');
30 is($nodes->[0]->{name}, 'first', 'first node name ok');
31 is($nodes->[1]->{name}, 'second', 'second node name ok');
32 is($focus->[0], $nodes->[0]->{id}, 'first node focused');
33 is($focus->[1], $nodes->[1]->{id}, 'second node second in focus stack');
39 ($nodes, $focus) = get_ws_content($tmp);
40 is(scalar @$nodes, 2, 'still two tiling nodes on workspace');
41 is($nodes->[0]->{name}, 'first', 'first node name ok');
42 is($nodes->[1]->{name}, 'second', 'second node name ok');
43 is($focus->[0], $nodes->[0]->{id}, 'first node focused');
44 is($focus->[1], $nodes->[1]->{id}, 'second node second in focus stack');