]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/242-no-focus.t
Silence "masks earlier declaration in same scope" warnings when executing tests.
[i3/i3] / testcases / t / 242-no-focus.t
index b3983436a2d411124dfdb1a585a36c58d4aa1d57..143ae5cf0bac2819c7bdaeac9866c26e909f09bf 100644 (file)
 # Ticket: #1416
 use i3test i3_autostart => 0;
 
+my ($config, $pid, $ws, $first, $second, $focused);
+
 #####################################################################
 # 1: open a window and check that it takes focus
 #####################################################################
 
-my $config = <<EOT;
+$config = <<EOT;
 # i3 config file (v4)
 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 EOT
 
-my $pid = launch_with_config($config);
+$pid = launch_with_config($config);
  
-my $ws = fresh_workspace;
-my $first = open_window;
-my $focused = get_focused($ws);
-my $second = open_window;
+$ws = fresh_workspace;
+$first = open_window;
+$focused = get_focused($ws);
+$second = open_window;
 
 isnt(get_focused($ws), $focused, 'focus has changed');
 
@@ -43,19 +45,19 @@ exit_gracefully($pid);
 #    it doesn't take focus
 #####################################################################
 
-my $config = <<EOT;
+$config = <<EOT;
 # i3 config file (v4)
 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 
 no_focus [instance=notme]
 EOT
 
-my $pid = launch_with_config($config);
+$pid = launch_with_config($config);
  
-my $ws = fresh_workspace;
-my $first = open_window;
-my $focused = get_focused($ws);
-my $second = open_window(wm_class => 'notme');
+$ws = fresh_workspace;
+$first = open_window;
+$focused = get_focused($ws);
+$second = open_window(wm_class => 'notme');
 
 is(get_focused($ws), $focused, 'focus has not changed');