]>
Commit | Line | Data |
---|---|---|
d161c455 TB |
1 | # This might look like shell script, but it's actually -*- perl -*- |
2 | use strict;use warnings; | |
d161c455 | 3 | |
d4b9a41a | 4 | use File::Slurp qw/read_file/; |
271d5078 | 5 | use Test::More; |
d161c455 | 6 | |
d161c455 TB |
7 | use HTML::TreeBuilder; |
8 | use HTML::Element::Library; | |
70669dc1 | 9 | use Test::XML; |
d161c455 TB |
10 | |
11 | sub tage { | |
12 | ||
13 | my $root = "t/html/crunch/crunch"; | |
14 | ||
15 | my $tree = HTML::TreeBuilder->new_from_file("$root.initial")->guts; | |
16 | ||
d161c455 TB |
17 | $tree->crunch(look_down => [ class => 'imageElement' ], leave => 1); |
18 | ||
d4b9a41a | 19 | is_xml $tree->as_XML, scalar read_file("$root.exp"), 'XML for crunch'; |
d161c455 TB |
20 | } |
21 | ||
22 | ||
23 | tage(); | |
24 | ||
271d5078 | 25 | done_testing; |