]> iEval git - html-element-library.git/blame - t/crunch.t
Fix tests
[html-element-library.git] / t / crunch.t
CommitLineData
d161c455
TB
1# This might look like shell script, but it's actually -*- perl -*-
2use strict;use warnings;
d161c455 3
d4b9a41a 4use File::Slurp qw/read_file/;
271d5078 5use Test::More;
d161c455 6
d161c455
TB
7use HTML::TreeBuilder;
8use HTML::Element::Library;
70669dc1 9use Test::XML;
d161c455
TB
10
11sub 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
23tage();
24
271d5078 25done_testing;
This page took 0.023894 seconds and 4 git commands to generate.