]> iEval git - html-element-library.git/blame - t/defmap.t
docs
[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);
7
8use TestUtils;
9use HTML::TreeBuilder;
10use HTML::Element::Library;
11
12sub 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
30tage();
31
This page took 0.024731 seconds and 4 git commands to generate.