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=bce61371d913754688d91e7a325f45b7bc7e6f1e;hpb=3c53c43950487cb2a92d0f49a8932c37867a6ba0 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;