(with skip)
[catagits/HTML-Zoom.git] / t / bugs / void.t
1 use strictures 1;
2 use Test::More skip_all => 'TODO test';
3
4 use HTML::Zoom;
5
6 my $tmpl = <<END;
7 <body>
8   <input class="main"/>
9 </body>
10 END
11
12 my $tmpl2 = <<END;
13 <body>
14   <div>cluck</div><input class="main"/>
15 </body>
16 END
17
18 my $z = HTML::Zoom->from_html($tmpl);
19
20 my $count = 0;
21 $z->select('input')->collect({
22   filter => sub { $count++; $_ },
23   passthrough => 1,
24 })->run;
25
26 is($count, 1,"collect on void");
27
28 is(
29   $z->select('input')
30   ->add_before(\"<div>cluck</div>")
31   ->to_html, $tmpl2,
32 "added before void");
33
34 done_testing;