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';
31 is(@{get_ws($ws)->{nodes}}, 1, 'window was not killed');
33 cmd '[con_id=__focused__ class=matchme] kill';
35 is(@{get_ws($ws)->{nodes}}, 0, 'window was killed');
37 ###############################################################################
38 # Verify that con_mark can be combined with other criteria
39 ###############################################################################
41 $ws = fresh_workspace;
42 open_window(wm_class => 'matchme');
45 cmd '[con_mark=marked class=doesnotmatch] kill';
47 is(@{get_ws($ws)->{nodes}}, 1, 'window was not killed');
49 cmd '[con_mark=marked class=matchme] kill';
51 is(@{get_ws($ws)->{nodes}}, 0, 'window was killed');
53 ###############################################################################