]> iEval git - html-element-library.git/blame - t/fillinform.t
fillinform tests
[html-element-library.git] / t / fillinform.t
CommitLineData
674cdd66
TB
1# This might look like shell script, but it's actually -*- perl -*-
2use strict;use warnings;
3use lib qw(t/ t/m/);
4
5use File::Slurp;
6use Test::More qw(no_plan);
7
8use TestUtils;
9use HTML::TreeBuilder;
10use HTML::Element::Library;
11
12sub tage {
13
14 my $root = "t/html/fillinform/fillinform";
15
16 my $tree = HTML::TreeBuilder->new_from_file("$root.initial")->guts;
17
18 my %data = (state => 'catatonic');
19
20 my $new_tree = HTML::TreeBuilder->new_from_content( $tree->fillinform(\%data) ) ;
21
22 my $generated_html = ptree($new_tree, "$root.gen");
23
24 is ($generated_html, File::Slurp::read_file("$root.exp"), "HTML for fillinform");
25}
26
27
28tage();
29
This page took 0.017851 seconds and 4 git commands to generate.