t/115: make the test a little shorter by using helper functions

This commit is contained in:
Michael Stapelberg 2012-11-13 09:39:42 +01:00
parent a6b6bb670a
commit e809bff1ab
1 changed files with 1 additions and 13 deletions

View File

@ -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