todo bug tests
[catagits/HTML-Zoom.git] / t / bugs / repeat_replace_on_empty_tag.t
1 use strictures 1;
2 use Test::More skip_all => 'TODO test';
3
4 use HTML::Zoom;
5
6 my $tmpla = <<END;
7 <body>
8   <div class="main"></div>
9 </body>
10 END
11
12
13 my $tmplb = <<END;
14 <body>
15   <div class="main" />
16 </body>
17 END
18
19 my $ra = HTML::Zoom->from_html( $tmpla )->select('.main')->repeat( [
20     sub{
21         $_->select('div')->replace_content('foo');
22     }
23 ])->to_html;
24
25 like( $ra, qr^<div class="main">foo</div>^ );
26
27
28 my $rb = HTML::Zoom->from_html( $tmplb )->select('.main')->repeat( [
29     sub{
30         $_->select('div')->replace_content('foo');
31     }
32 ])->to_html;
33
34 like( $rb, qr^<div class="main">foo</div>^);
35
36 done_testing;