From: Michael Stapelberg Date: Thu, 4 Aug 2011 18:11:01 +0000 (+0200) Subject: extend t/65-for_window to check for the 'instance' criterion X-Git-Tag: 4.0.2~57^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=51119c75c16f86d06b0dde079c8fadd5a7f521ae;p=i3%2Fi3 extend t/65-for_window to check for the 'instance' criterion --- diff --git a/testcases/t/65-for_window.t b/testcases/t/65-for_window.t index f156f11b..2fb85dfa 100644 --- a/testcases/t/65-for_window.t +++ b/testcases/t/65-for_window.t @@ -244,6 +244,73 @@ cmp_ok(@content, '==', 1, 'one node on this workspace now'); is($content[0]->{border}, 'normal', 'no border'); +exit_gracefully($process->pid); + +############################################################## +# 5: check that a class criterion does not match the instance +############################################################## + +$config = <root->create_child( + class => WINDOW_CLASS_INPUT_OUTPUT, + rect => [ 0, 0, 30, 30 ], + background_color => '#00ff00', +); + +$window->_create; + +set_wm_class($window->id, 'bar', 'foo'); +$window->name('usethis'); +$window->map; +sleep 0.25; + +@content = @{get_ws_content($tmp)}; +cmp_ok(@content, '==', 1, 'one node on this workspace now'); +is($content[0]->{border}, 'normal', 'normal border, not matched'); + +exit_gracefully($process->pid); + +############################################################## +# 6: check that the 'instance' criterion works +############################################################## + +$config = <root->create_child( + class => WINDOW_CLASS_INPUT_OUTPUT, + rect => [ 0, 0, 30, 30 ], + background_color => '#00ff00', +); + +$window->_create; + +set_wm_class($window->id, 'bar', 'foo'); +$window->name('usethis'); +$window->map; +sleep 0.25; + +@content = @{get_ws_content($tmp)}; +cmp_ok(@content, '==', 1, 'one node on this workspace now'); +is($content[0]->{border}, 'none', 'no border'); + exit_gracefully($process->pid); done_testing;