tests: eliminate List::MoreUtils

This commit is contained in:
Michael Stapelberg
2011-10-05 23:21:36 +01:00
parent b9224634dd
commit 3136573a70
3 changed files with 21 additions and 6 deletions

View File

@ -2,9 +2,25 @@
# vim:ts=4:sw=4:expandtab
use i3test;
use List::MoreUtils qw(all none);
use List::Util qw(first);
# to not depend on List::MoreUtils
sub all (&@) {
my $cb = shift;
for (@_) {
return 0 unless $cb->();
}
return 1;
}
sub none (&@) {
my $cb = shift;
for (@_) {
return 0 if $cb->();
}
return 1;
}
my $i3 = i3(get_socket_path());
####################