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;