]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/73-get-marks.t
tests: Use AnyEvent::I3’s get_marks (requires AE::I3 >=0.08)
[i3/i3] / testcases / t / 73-get-marks.t
index 86481747ca7ee9f0f61c56229b4642e119594c6c..e74c233a6a3560858909c9631f3164ff35780b0b 100644 (file)
@@ -5,21 +5,8 @@
 #
 use i3test;
 
-# TODO: this will be available in AnyEvent::I3 soon
 sub get_marks {
-    my $i3 = i3(get_socket_path());
-    $i3->connect->recv;
-    my $cv = AnyEvent->condvar;
-    my $msg = $i3->message(5);
-    my $t;
-    $msg->cb(sub {
-        my ($_cv) = @_;
-        $cv->send($_cv->recv);
-    });
-    $t = AnyEvent->timer(after => 2, cb => sub {
-        $cv->croak('timeout while waiting for the marks');
-    });
-    return $cv->recv;
+    return i3(get_socket_path())->get_marks->recv;
 }
 
 ##############################################################