From fce422d99eca83394166eb22b3e852d1c3b3387d Mon Sep 17 00:00:00 2001 From: Maik Fischer Date: Tue, 11 Oct 2011 13:13:42 +0100 Subject: [PATCH] i3test.pm: use strict; use warnings; and fix related bugs --- testcases/lib/i3test.pm | 3 ++- testcases/t/135-floating-focus.t | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/testcases/lib/i3test.pm b/testcases/lib/i3test.pm index 9b7cc138..39fd7a94 100644 --- a/testcases/lib/i3test.pm +++ b/testcases/lib/i3test.pm @@ -1,5 +1,6 @@ package i3test; # vim:ts=4:sw=4:expandtab +use strict; use warnings; use File::Temp qw(tmpnam tempfile tempdir); use Test::Builder; @@ -243,7 +244,7 @@ sub get_focused { $lf = $focused[0]; last unless defined($con->{focus}); @focused = @{$con->{focus}}; - @cons = grep { $_->{id} == $lf } (@{$con->{nodes}}, @{$con->{'floating_nodes'}}); + my @cons = grep { $_->{id} == $lf } (@{$con->{nodes}}, @{$con->{'floating_nodes'}}); $con = $cons[0]; } diff --git a/testcases/t/135-floating-focus.t b/testcases/t/135-floating-focus.t index 4c5b562f..a1ab211e 100644 --- a/testcases/t/135-floating-focus.t +++ b/testcases/t/135-floating-focus.t @@ -62,9 +62,9 @@ is($x->input_focus, $second->id, 'second con still focused after killing third') $tmp = fresh_workspace; -$first = open_window($x, '#ff0000'); # window 5 -$second = open_window($x, '#00ff00'); # window 6 -my $third = open_window($x, '#0000ff'); # window 7 +$first = open_window($x, { background_color => '#ff0000' }); # window 5 +$second = open_window($x, { background_color => '#00ff00' }); # window 6 +my $third = open_window($x, { background_color => '#0000ff' }); # window 7 is($x->input_focus, $third->id, 'last container focused'); -- 2.39.2