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)
22 ###############################################################################
23 # Verify that con_id can be combined with other criteria
24 ###############################################################################
26 $ws = fresh_workspace;
27 open_window(wm_class => 'matchme');
29 cmd '[con_id=__focused__ class=doesnotmatch] kill';
30 is(@{get_ws($ws)->{nodes}}, 1, 'window was not killed');
32 cmd '[con_id=__focused__ class=matchme] kill';
33 is(@{get_ws($ws)->{nodes}}, 0, 'window was killed');
35 ###############################################################################
36 # Verify that con_mark can be combined with other criteria
37 ###############################################################################
39 $ws = fresh_workspace;
40 open_window(wm_class => 'matchme');
43 cmd '[con_mark=marked class=doesnotmatch] kill';
44 is(@{get_ws($ws)->{nodes}}, 1, 'window was not killed');
46 cmd '[con_mark=marked class=matchme] kill';
47 is(@{get_ws($ws)->{nodes}}, 0, 'window was killed');
49 ###############################################################################