From 683bfa58d52ca698b286963bc4c8da71d1b37f84 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 26 Sep 2011 19:36:27 +0100 Subject: [PATCH] =?utf8?q?tests:=20Use=20AnyEvent::I3=E2=80=99s=20get=5Fma?= =?utf8?q?rks=20(requires=20AE::I3=20>=3D0.08)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We also don’t bother with timeouts anymore. It’s expected to run the tests with a sufficiently recent version of i3. The tests will just hang if it doesn’t work. --- testcases/t/73-get-marks.t | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/testcases/t/73-get-marks.t b/testcases/t/73-get-marks.t index 86481747..e74c233a 100644 --- a/testcases/t/73-get-marks.t +++ b/testcases/t/73-get-marks.t @@ -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; } ############################################################## -- 2.39.5