fixing redeclaration warnings in testcases

This commit is contained in:
Johannes Lange 2017-12-26 13:16:15 +01:00
parent 320246ab47
commit 80ea18624a
8 changed files with 20 additions and 20 deletions

View File

@ -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');
##############################################################################

View File

@ -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');

View File

@ -429,7 +429,7 @@ does_i3_live;
################################################################################
clear_scratchpad;
my $ws = fresh_workspace;
$ws = fresh_workspace;
open_window;
my $scratch = get_focused($ws);

View File

@ -190,7 +190,7 @@ exit_gracefully($pid);
# 7: check floating_maximum_size with cmd_size
################################################################################
my $config = <<EOT;
$config = <<EOT;
# i3 config file (v4)
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
@ -201,12 +201,12 @@ EOT
$pid = launch_with_config($config);
my $window = open_floating_window(rect => [ 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');

View File

@ -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');

View File

@ -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;

View File

@ -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');

View File

@ -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';