From df354d91e7e315b839d5c292e386e64ca339cb07 Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 11 Sep 2015 15:32:51 +0100 Subject: filesets! don't work I think I'm trying to be too clever, merging "these files make up a document, a file per language" with "these files are needed to build a result file in a certain language". Those should probably be separate classes. --- t/lib/Test/WebCoso.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 't/lib/Test/WebCoso.pm') diff --git a/t/lib/Test/WebCoso.pm b/t/lib/Test/WebCoso.pm index 566e4bc..c179e47 100644 --- a/t/lib/Test/WebCoso.pm +++ b/t/lib/Test/WebCoso.pm @@ -1,19 +1,20 @@ # -*- mode: perl6 -*- unit module Test::WebCoso; use Test; +use WebCoso::FileSet; -sub cmp-files($a,$b,$msg) is export { +sub cmp-files(WebCoso::FileSet $a,$b,$msg) is export { ok( - ($a.defined and $b.defined and $a.keys eqv $b.keys and + ($a.defined and $b.defined and $a.langs eqv $b.keys and [and] map { my $cmp = $b{$_}; if $cmp ~~ Callable { - $cmp.($a{$_}) + $cmp.($a.for-lang($_)) } else { - $a{$_}.path.IO.abspath eq $cmp.IO.abspath + $a.for-lang($_).path.IO.abspath eq $cmp.IO.abspath } - }, $a.keys), + }, $a.langs), $msg, ); } -- cgit v1.2.3