From: Michael Stapelberg Date: Sun, 28 Nov 2010 20:28:44 +0000 (+0100) Subject: tests: fix t/31-stacking-order.t: don’t get focus on workspace level, use get_focused() X-Git-Tag: tree-pr1~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=47fe31f104165d862cc7afeed9607a8e193ae6f7;p=i3%2Fi3 tests: fix t/31-stacking-order.t: don’t get focus on workspace level, use get_focused() --- diff --git a/testcases/t/31-stacking-order.t b/testcases/t/31-stacking-order.t index 747d5b57..3335cba7 100644 --- a/testcases/t/31-stacking-order.t +++ b/testcases/t/31-stacking-order.t @@ -28,16 +28,13 @@ isnt($first, $second, 'two different containers opened'); ############################################################## $i3->command('layout stacking')->recv; -my ($nodes, $focus) = get_ws_content($tmp); -is($focus->[0], $second, 'second container still focused'); +is(get_focused($tmp), $second, 'second container still focused'); $i3->command('next v')->recv; -($nodes, $focus) = get_ws_content($tmp); -is($focus->[0], $first, 'first container focused'); +is(get_focused($tmp), $first, 'first container focused'); $i3->command('prev v')->recv; -($nodes, $focus) = get_ws_content($tmp); -is($focus->[0], $second, 'second container focused again'); +is(get_focused($tmp), $second, 'second container focused again'); ############################################################## # now change the orientation to horizontal and cycle @@ -48,12 +45,10 @@ $i3->command('split h')->recv; $i3->command('level down')->recv; $i3->command('next v')->recv; -($nodes, $focus) = get_ws_content($tmp); -is($focus->[0], $first, 'first container focused'); +is(get_focused($tmp), $first, 'first container focused'); $i3->command('prev v')->recv; -($nodes, $focus) = get_ws_content($tmp); -is($focus->[0], $second, 'second container focused again'); +is(get_focused($tmp), $second, 'second container focused again'); diag( "Testing i3, Perl $], $^X" );