]>
Commit | Line | Data |
---|---|---|
f25dca7f TB |
1 | # This might look like shell script, but it's actually -*- perl -*- |
2 | use strict;use warnings; | |
3 | use lib qw(t/ t/m/); | |
4 | ||
5 | use File::Slurp; | |
6 | use Test::More qw(no_plan); | |
7 | ||
8 | use TestUtils; | |
9 | use HTML::TreeBuilder; | |
10 | use HTML::Element::Library; | |
11 | ||
12 | sub tage { | |
13 | ||
14 | my $root = "t/html/defmap/defmap"; | |
15 | ||
16 | my $tree = HTML::TreeBuilder->new_from_file("$root.initial")->guts; | |
17 | ||
18 | #warn "TREE: $tree" . $tree->as_HTML; | |
19 | ||
20 | my %data = (pause => 'arsenal rules'); | |
21 | ||
9a087986 | 22 | $tree->defmap(smap => \%data, 1); |
f25dca7f TB |
23 | |
24 | my $generated_html = ptree($tree, "$root.gen"); | |
25 | ||
26 | is ($generated_html, File::Slurp::read_file("$root.exp"), "HTML for same_as"); | |
27 | } | |
28 | ||
29 | ||
30 | tage(); | |
31 |