]> iEval git - html-element-library.git/blame - t/defmap.t
fixes
[html-element-library.git] / t / defmap.t
CommitLineData
f25dca7f
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);
855ca7e9 7use Test::XML;
f25dca7f
TB
8
9use TestUtils;
10use HTML::TreeBuilder;
11use HTML::Element::Library;
12
13sub tage {
14
15 my $root = "t/html/defmap/defmap";
16
17 my $tree = HTML::TreeBuilder->new_from_file("$root.initial")->guts;
18
19 #warn "TREE: $tree" . $tree->as_HTML;
20
21 my %data = (pause => 'arsenal rules');
22
9a087986 23 $tree->defmap(smap => \%data, 1);
f25dca7f 24
855ca7e9
TB
25 my $g = ptree($tree, "$root.gen");
26 my $e = File::Slurp::read_file("$root.exp");
27 warn "generated:$g:\nexpected:$e:";
f25dca7f 28
855ca7e9 29 is_xml ($g, $e, "HTML for defmap");
f25dca7f
TB
30}
31
32
33tage();
34
This page took 0.020999 seconds and 4 git commands to generate.