VCS-CMSynergy
view release on metacpan or search on metacpan
# Set the date format (the default is "%c" which depends
# on the locale, the C library etc and hence makes comparisons
# with expected values fail)
# NOTE: restrict yourself to strftime conversion specifiers from
# the ISO C standard; also, don't use locale dependent conversions
$ENV{CCM_DATETIME_FMT} = "%Y-%m-%d %H:%M:%S";
}
# all_ok BLOCK AREF [, TEST_NAME]
# check if predicate BLOCK holds for all elements in list
sub all_ok(&$;$)
{
my ($block, $aref, $test_name) = @_;
local $Test::Builder::Level = 2; # report failure for caller of all_ok
if (my @failed = grep { ! &$block($_) } @$aref)
{
fail("all: $test_name");
diag "\t$test_name failed for:\n";
diag("\t\t$_\n") foreach @failed;
( run in 0.828 second using v1.01-cache-2.11-cpan-49f99fa48dc )