X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Factions.t;h=790962f1dc5053494ad841f8688dc4c401b7c3a4;hb=dae33531219f600d126f485532fd20e5ad1b4be1;hp=d9b883a2becaa885c7550f0b42c8b2212a248ca4;hpb=865bb5d2274193c492063e21f595aa939e08e55d;p=catagits%2FHTML-Zoom.git diff --git a/t/actions.t b/t/actions.t index d9b883a..790962f 100644 --- a/t/actions.t +++ b/t/actions.t @@ -262,4 +262,43 @@ is( 'repeat_content ok' ); +is( + run_for { + my @between; + $_->repeat_content( + [ + sub { + HTML::Zoom::CodeStream->from_array( + (filter + filter($_ => '.name' => $r_content->('mst')) + => '.career' => $r_content->('Chainsaw Wielder')), + HTML::Zoom::CodeStream->from_array(@between) + )->flatten + }, + sub { + filter + filter($_ => '.name' => $r_content->('mdk')) + => '.career' => $r_content->('Adminion') + }, + ], + { filter => sub { + filter $_[0] => 'hr' => sub { $_->collect({ into => \@between }) } + } + } + ) + }, + q{ +
+ mst + Chainsaw Wielder +
+ mdk + Adminion + +
+ +}, + 'repeat_content with filter ok' +); + done_testing;