2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • http://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_autostart => 0;
18 use X11::XCB qw(PROP_MODE_REPLACE);
20 ##############################################################
21 # 13: check that the tiling / floating criteria work.
22 ##############################################################
26 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
27 for_window [tiling] mark tiled
28 for_window [floating] mark floated
31 my $pid = launch_with_config($config);
32 my $tmp = fresh_workspace;
37 my @nodes = @{get_ws($tmp)->{nodes}};
38 cmp_ok(@nodes, '==', 1, 'one tiling container on this workspace');
39 is_deeply($nodes[0]->{marks}, [ 'tiled' ], "mark set for 'tiling' criterion");
41 @nodes = @{get_ws($tmp)->{floating_nodes}};
42 cmp_ok(@nodes, '==', 1, 'one floating container on this workspace');
43 is_deeply($nodes[0]->{nodes}[0]->{marks}, [ 'floated' ], "mark set for 'floating' criterion");
45 exit_gracefully($pid);
47 ##############################################################