Reorder tests to not use the same number (#2947)
Distinct numbers make re-running individual tests easier by helping with tab-completion. Completeness verified using: % for i in $(seq 0 600) do files=$(ls testcases/t/$(printf "%03d" $i)-*.t 2>&- | wc -l) [ "$files" != "0" ] && [ "$files" != "1" ] && echo "clash: $i" done
This commit is contained in:
committed by
GitHub
parent
a5aed10d09
commit
3a31a76b2a
52
testcases/t/275-ipc-window-close.t
Normal file
52
testcases/t/275-ipc-window-close.t
Normal file
@ -0,0 +1,52 @@
|
||||
#!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)
|
||||
#
|
||||
# Tests that the ipc close event works properly
|
||||
#
|
||||
# Bug still in: 4.8-7-gf4a8253
|
||||
use i3test;
|
||||
|
||||
my $i3 = i3(get_socket_path());
|
||||
$i3->connect()->recv;
|
||||
|
||||
my $cv;
|
||||
my $t;
|
||||
|
||||
sub reset_test {
|
||||
$cv = AE::cv;
|
||||
$t = AE::timer(0.5, 0, sub { $cv->send(0); });
|
||||
}
|
||||
|
||||
reset_test;
|
||||
|
||||
$i3->subscribe({
|
||||
window => sub {
|
||||
my ($e) = @_;
|
||||
if ($e->{change} eq 'close') {
|
||||
$cv->send($e->{container});
|
||||
}
|
||||
},
|
||||
})->recv;
|
||||
|
||||
my $window = open_window;
|
||||
|
||||
cmd 'kill';
|
||||
my $con = $cv->recv;
|
||||
|
||||
ok($con, 'closing a window should send the window::close event');
|
||||
is($con->{window}, $window->{id}, 'the event should contain information about the window');
|
||||
|
||||
done_testing;
|
Reference in New Issue
Block a user