factor out ArrayStream, update new stream types to respect peek
[catagits/HTML-Zoom.git] / t / actions.t
index 1267bd3..1d83aa1 100644 (file)
@@ -18,9 +18,9 @@ my $tmpl = <<END;
 </body>
 END
 
-sub src_stream { HTML::Zoom::Parser::BuiltIn->html_to_stream($tmpl); }
+sub src_stream { HTML::Zoom::Parser::BuiltIn->new->html_to_stream($tmpl); }
 
-sub html_sink { HTML::Zoom::Producer::BuiltIn->html_from_stream($_[0]) }
+sub html_sink { HTML::Zoom::Producer::BuiltIn->new->html_from_stream($_[0]) }
 
 my $fb = HTML::Zoom::FilterBuilder->new;
 
@@ -268,12 +268,12 @@ is(
     $_->repeat_content(
       [
         sub {
-          HTML::Zoom::CodeStream->from_array(
+          HTML::Zoom::ArrayStream->new({ array => [
             (filter
               filter($_ => '.name' => $r_content->('mst'))
               => '.career' => $r_content->('Chainsaw Wielder')),
-            HTML::Zoom::CodeStream->from_array(@between)
-          )->flatten
+            HTML::Zoom::ArrayStream->new({ array => \@between })
+          ] })->flatten
         },
         sub {
           filter