]>
Commit | Line | Data |
---|---|---|
674cdd66 TB |
1 | # This might look like shell script, but it's actually -*- perl -*- |
2 | use strict;use warnings; | |
674cdd66 TB |
3 | |
4 | use File::Slurp; | |
5 | use Test::More qw(no_plan); | |
6 | ||
674cdd66 TB |
7 | use HTML::TreeBuilder; |
8 | use HTML::Element::Library; | |
d4b9a41a | 9 | use Test::XML; |
674cdd66 TB |
10 | |
11 | sub tage { | |
12 | ||
13 | my $root = "t/html/fillinform/fillinform"; | |
14 | ||
15 | my $tree = HTML::TreeBuilder->new_from_file("$root.initial")->guts; | |
16 | ||
17 | my %data = (state => 'catatonic'); | |
18 | ||
19 | my $new_tree = HTML::TreeBuilder->new_from_content( $tree->fillinform(\%data) ) ; | |
20 | ||
d4b9a41a | 21 | is_xml ($new_tree->as_XML, scalar File::Slurp::read_file("$root.exp"), "HTML for fillinform"); |
674cdd66 TB |
22 | } |
23 | ||
24 | ||
25 | tage(); | |
26 |