# -*- mode: perl6 -*- unit module Test::WebCoso; use Test; use WebCoso::FileSet; sub cmp-files(WebCoso::FileSet $a,$b,$msg) is export { ok( ($a.defined and $b.defined and $a.langs eqv $b.keys and [and] map { my $cmp = $b{$_}; if $cmp ~~ Callable { $cmp.($a.for-lang($_)) } else { $a.for-lang($_).path.IO.abspath eq $cmp.IO.abspath } }, $a.langs), $msg, ); }