From: Johannes Lange Date: Tue, 26 Dec 2017 12:16:15 +0000 (+0100) Subject: fixing redeclaration warnings in testcases X-Git-Tag: 4.15~16^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=80ea18624a06b4535ed51d935e4f7d65f696519e;p=i3%2Fi3 fixing redeclaration warnings in testcases --- diff --git a/testcases/t/113-urgent.t b/testcases/t/113-urgent.t index 9c1507e6..1e2644ad 100644 --- a/testcases/t/113-urgent.t +++ b/testcases/t/113-urgent.t @@ -304,7 +304,7 @@ for ($type = 1; $type <= 2; $type++) { cmd 'move right'; cmd '[id="' . $w3->id . '"] focus'; sync_with_i3; - my $ws = get_ws($tmp); + $ws = get_ws($tmp); ok(!$ws->{urgent}, 'urgent flag not set on workspace'); ############################################################################## diff --git a/testcases/t/156-fullscreen-focus.t b/testcases/t/156-fullscreen-focus.t index cfa2405e..9c396f40 100644 --- a/testcases/t/156-fullscreen-focus.t +++ b/testcases/t/156-fullscreen-focus.t @@ -340,8 +340,8 @@ is_num_fullscreen($tmp, 0, 'no fullscreen windows'); kill_all_windows; $tmp = fresh_workspace; -my $first = open_floating_window; -my $second = open_window; +$first = open_floating_window; +$second = open_window; cmd 'fullscreen'; is($x->input_focus, $second->id, 'fullscreen window focused'); is_num_fullscreen($tmp, 1, '1 fullscreen window'); @@ -356,8 +356,8 @@ is_num_fullscreen($tmp, 0, 'no fullscreen windows'); kill_all_windows; $tmp = fresh_workspace; -my $first = open_window; -my $second = open_floating_window; +$first = open_window; +$second = open_floating_window; cmd 'fullscreen'; is($x->input_focus, $second->id, 'fullscreen window focused'); is_num_fullscreen($tmp, 1, '1 fullscreen window'); @@ -376,10 +376,10 @@ is_num_fullscreen($tmp, 0, 'no fullscreen windows'); kill_all_windows; $tmp = fresh_workspace; -my $first = open_window; +$first = open_window; $tmp2 = fresh_workspace; -my $second = open_window; +$second = open_window; cmd 'fullscreen'; is($x->input_focus, $second->id, 'fullscreen window focused'); is_num_fullscreen($tmp2, 1, '1 fullscreen window'); diff --git a/testcases/t/185-scratchpad.t b/testcases/t/185-scratchpad.t index f94bd75b..147890e1 100644 --- a/testcases/t/185-scratchpad.t +++ b/testcases/t/185-scratchpad.t @@ -429,7 +429,7 @@ does_i3_live; ################################################################################ clear_scratchpad; -my $ws = fresh_workspace; +$ws = fresh_workspace; open_window; my $scratch = get_focused($ws); diff --git a/testcases/t/189-floating-constraints.t b/testcases/t/189-floating-constraints.t index ea4c08de..6b082bfd 100644 --- a/testcases/t/189-floating-constraints.t +++ b/testcases/t/189-floating-constraints.t @@ -190,7 +190,7 @@ exit_gracefully($pid); # 7: check floating_maximum_size with cmd_size ################################################################################ -my $config = < [ 0, 0, 90, 80 ]); +$window = open_floating_window(rect => [ 0, 0, 90, 80 ]); cmd 'border none'; cmd 'resize set 101 91'; sync_with_i3; -my $rect = $window->rect; +$rect = $window->rect; is($rect->{width}, 100, 'width did not exceed maximum width'); is($rect->{height}, 90, 'height did not exceed maximum height'); diff --git a/testcases/t/195-net-active-window.t b/testcases/t/195-net-active-window.t index aee1e03a..18245dfc 100644 --- a/testcases/t/195-net-active-window.t +++ b/testcases/t/195-net-active-window.t @@ -137,7 +137,7 @@ is($x->input_focus, $win3->id, 'window 3 still focused'); # is received. ################################################################################ -my $scratch = open_window; +$scratch = open_window; is($x->input_focus, $scratch->id, 'to-scratchpad window has focus'); diff --git a/testcases/t/240-focus-on-window-activation.t b/testcases/t/240-focus-on-window-activation.t index cd3989c4..57060753 100644 --- a/testcases/t/240-focus-on-window-activation.t +++ b/testcases/t/240-focus-on-window-activation.t @@ -111,7 +111,7 @@ EOT $pid = launch_with_config($config); -my $ws = fresh_workspace; +$ws = fresh_workspace; $first = open_window; $second = open_window; @@ -165,7 +165,7 @@ EOT $pid = launch_with_config($config); -my $ws = fresh_workspace; +$ws = fresh_workspace; $first = open_window; $second = open_window; diff --git a/testcases/t/252-floating-size.t b/testcases/t/252-floating-size.t index ac0c48d0..2c8edf39 100644 --- a/testcases/t/252-floating-size.t +++ b/testcases/t/252-floating-size.t @@ -79,8 +79,8 @@ cmp_ok($content[0]->{rect}->{height}, '==', $expected_height, "height changed to ################################################################################ cmd 'resize set 44 ppt 111 px'; -my $expected_width = int(0.44 * 1333); -my $expected_height = 111; +$expected_width = int(0.44 * 1333); +$expected_height = 111; @content = @{get_ws($tmp)->{floating_nodes}}; cmp_ok($content[0]->{rect}->{x}, '==', $oldrect->{x}, 'x untouched'); @@ -89,8 +89,8 @@ cmp_ok($content[0]->{rect}->{width}, '==', $expected_width, "width changed to $e cmp_ok($content[0]->{rect}->{height}, '==', $expected_height, "height changed to $expected_height px"); cmd 'resize set 222 px 100 ppt'; -my $expected_width = 222; -my $expected_height = 999; +$expected_width = 222; +$expected_height = 999; @content = @{get_ws($tmp)->{floating_nodes}}; cmp_ok($content[0]->{rect}->{x}, '==', $oldrect->{x}, 'x untouched'); diff --git a/testcases/t/504-move-workspace-to-output.t b/testcases/t/504-move-workspace-to-output.t index 86bad5e5..4ec33f66 100644 --- a/testcases/t/504-move-workspace-to-output.t +++ b/testcases/t/504-move-workspace-to-output.t @@ -187,10 +187,10 @@ ok($ws1 ~~ @$x0, 'ws1 on fake-0'); my $__i3_scratch = get_ws('__i3_scratch'); is(scalar @{$__i3_scratch->{floating_nodes}}, 0, 'scratchpad is empty'); -my $ws0 = fresh_workspace(output => 0); +$ws0 = fresh_workspace(output => 0); open_window(wm_class => 'a'); -my $ws1 = fresh_workspace(output => 1); +$ws1 = fresh_workspace(output => 1); open_window(wm_class => 'b'); my $scratchpad_window = open_window(wm_class => 'c'); cmd 'move to scratchpad';