]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/140-focus-lost.t
Merge pull request #1564 from acrisci/feature/i3bar-markup-per-block
[i3/i3] / testcases / t / 140-focus-lost.t
index 042afcfefd9e59e21d7c26a628e94c471301e06b..0609fecb0cfaeb509d700df440c6955117d90130 100644 (file)
@@ -1,5 +1,19 @@
 #!perl
 # vim:ts=4:sw=4:expandtab
+#
+# Please read the following documents before working on tests:
+# • http://build.i3wm.org/docs/testsuite.html
+#   (or docs/testsuite)
+#
+# • http://build.i3wm.org/docs/lib-i3test.html
+#   (alternatively: perldoc ./testcases/lib/i3test.pm)
+#
+# • http://build.i3wm.org/docs/ipc.html
+#   (or docs/ipc)
+#
+# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
+#   (unless you are already familiar with Perl)
+#
 # Regression: Check if the focus stays the same when switching the layout
 # bug introduced by 77d0d42ed2d7ac8cafe267c92b35a81c1b9491eb
 use i3test;
@@ -13,7 +27,7 @@ sub check_order {
     my @nums = map { $_->{num} } grep { defined($_->{num}) } @ws;
     my @sorted = sort @nums;
 
-    cmp_deeply(\@nums, \@sorted, $msg);
+    is_deeply(\@nums, \@sorted, $msg);
 }
 
 my $tmp = fresh_workspace;
@@ -22,8 +36,6 @@ my $left = open_window;
 my $mid = open_window;
 my $right = open_window;
 
-sync_with_i3($x);
-
 diag("left = " . $left->id . ", mid = " . $mid->id . ", right = " . $right->id);
 
 is($x->input_focus, $right->id, 'Right window focused');