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 use i3test i3_config => <<EOT;
19 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
20 for_window [tiling] mark tiled
21 for_window [floating] mark floated
23 use X11::XCB qw(PROP_MODE_REPLACE);
25 ##############################################################
26 # 13: check that the tiling / floating criteria work.
27 ##############################################################
29 my $tmp = fresh_workspace;
34 my @nodes = @{get_ws($tmp)->{nodes}};
35 cmp_ok(@nodes, '==', 1, 'one tiling container on this workspace');
36 is_deeply($nodes[0]->{marks}, [ 'tiled' ], "mark set for 'tiling' criterion");
38 @nodes = @{get_ws($tmp)->{floating_nodes}};
39 cmp_ok(@nodes, '==', 1, 'one floating container on this workspace');
40 is_deeply($nodes[0]->{nodes}[0]->{marks}, [ 'floated' ], "mark set for 'floating' criterion");
42 ##############################################################