From: Michael Stapelberg Date: Tue, 13 Nov 2012 08:39:42 +0000 (+0100) Subject: t/115: make the test a little shorter by using helper functions X-Git-Tag: 4.4~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e809bff1abdfaefeb6b2b7e2a63cb229534a64c7;p=i3%2Fi3 t/115: make the test a little shorter by using helper functions --- diff --git a/testcases/t/115-ipc-workspaces.t b/testcases/t/115-ipc-workspaces.t index 1dd12417..cffcc455 100644 --- a/testcases/t/115-ipc-workspaces.t +++ b/testcases/t/115-ipc-workspaces.t @@ -22,19 +22,7 @@ my $i3 = i3(get_socket_path()); # Workspaces requests and events ################################ -my $workspaces = $i3->get_workspaces->recv; - -ok(@{$workspaces} > 0, "More than zero workspaces found"); - -# my $name_exists = all { defined($_->{name}) } @{$workspaces}; -# ok($name_exists, "All workspaces have a name"); - -# Focused workspace -my $focused; -foreach (@{$workspaces}) { - $focused = $_ if $_->{focused}; -} -ok($focused, "At least one workspace is focused"); +my $focused = get_ws(focused_ws()); # Events