]>
Commit | Line | Data |
---|---|---|
ce4e9192 | 1 | #!/usr/bin/perl -T |
aa016126 MG |
2 | use lib '.'; |
3 | use t::lib tests => 1; | |
ce4e9192 | 4 | |
aa016126 MG |
5 | my $root = HTML::TreeBuilder->new_from_content(<<'EOHTML'); |
6 | <html> | |
ce4e9192 TB |
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 | ||
ce4e9192 TB |
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's afraid of Fred...</div> </body> | |
27 | </html> | |
28 | '; | |
29 | ||
aa016126 | 30 | isxml($root, \$expected, 'prune'); |