# Bug still in: 4.12-46-g2123888
use i3test;
-SKIP: {
- skip "AnyEvent::I3 too old (need >= 0.17)", 1 if $AnyEvent::I3::VERSION < 0.17;
+# We cannot use events_for in this test as we cannot send events after
+# issuing the restart/shutdown command.
my $i3 = i3(get_socket_path());
$i3->connect->recv;
-my $cv = AE::cv;
+my $cv = AnyEvent->condvar;
my $timer = AE::timer 0.5, 0, sub { $cv->send(0); };
$i3->subscribe({
$i3 = i3(get_socket_path());
$i3->connect->recv;
-$cv = AE::cv;
+$cv = AnyEvent->condvar;
$timer = AE::timer 0.5, 0, sub { $cv->send(0); };
$i3->subscribe({
diag "Event:\n", Dumper($e);
ok($e, 'the shutdown event should emit when the ipc is exited by command');
is($e->{change}, 'exit', 'the `change` field should tell the reason for the shutdown');
-}
done_testing;