X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FHTML-Zoom.git;a=blobdiff_plain;f=t%2Fdwim-autoload.t;h=8765a995a9689820c019214e6fb57febb2b529fc;hp=2fc73de7110627a115a9865e8350acdef69c45a9;hb=14e73b8419d34f1501e47bc74a298df092cebdb5;hpb=5ad4b46120e8047a91bd9759da91b414e7a4a0cc diff --git a/t/dwim-autoload.t b/t/dwim-autoload.t index 2fc73de..8765a99 100644 --- a/t/dwim-autoload.t +++ b/t/dwim-autoload.t @@ -342,4 +342,20 @@ sub code_stream (&) { 'Hashref selectors on codestream'; } +{ + ok my $dwim = HTML::Zoom + ->from_html(q[]) + ->select('ul')->collect({ + passthrough => 1, + filter => sub { + $_->set_attribute({ + 'li.foo' => [{ class => 'baz', name => 'moo', }], + 'li.bar' => [ class => 'qux' ], + }); + } + })->to_html; + is $dwim, '', + 'Hashref selectors with hashref attributes on codestream'; +} + done_testing;