X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=inline;f=testcases%2Ft%2F140-focus-lost.t;h=0609fecb0cfaeb509d700df440c6955117d90130;hb=f2b728ac5ec00d004f954f85077635668f21fbfd;hp=042afcfefd9e59e21d7c26a628e94c471301e06b;hpb=fce7570f961bcb373e1ac0965bb3ed41747e0d3b;p=i3%2Fi3 diff --git a/testcases/t/140-focus-lost.t b/testcases/t/140-focus-lost.t index 042afcfe..0609fecb 100644 --- a/testcases/t/140-focus-lost.t +++ b/testcases/t/140-focus-lost.t @@ -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');