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