]> iEval git - html-element-library.git/blob - t/prune.t
Refactor tests (first pass)
[html-element-library.git] / t / prune.t
1 #!/usr/bin/perl -T
2 use lib '.';
3 use t::lib tests => 1;
4
5 my $root = HTML::TreeBuilder->new_from_content(<<'EOHTML');
6 <html>
7 <head>
8 <title></title>
9 </head>
10 <body>
11 <div>There was man named Jed</div>
12 <div>He did not have a head</div>
13 <div>He lived beneath a sled</div>
14 <div>Now he's afraid of Fred...</div>
15 <div>
16 </div>
17 </body>
18 </html>
19 EOHTML
20
21 $root->prune;
22
23 my $expected = '
24 <html>
25 <body>
26 <div>There was man named Jed</div><div>He did not have a head</div><div>He lived beneath a sled</div><div>Now he&#39;s afraid of Fred...</div> </body>
27 </html>
28 ';
29
30 isxml($root, \$expected, 'prune');
This page took 0.023745 seconds and 4 git commands to generate.