1 # This might look like shell script, but it's actually -*- perl -*-
6 use Test::More qw(no_plan);
10 use HTML::Element::Library;
15 $branch->look_down(id => 'age')->replace_content($age);
21 my $root = "t/html/same_as/same_as";
23 my $tree = HTML::TreeBuilder->new_from_file("$root.initial");
25 #warn "TREE: $tree" . $tree->as_HTML;
27 my %data = (people_id => 888, phone => '444-4444', email => 'dont-you-dare-render@xml.com');
29 $tree->hash_map(hash => \%data, to_attr => 'sid', excluding => ['email']);
31 my $generated_html = ptree($tree, "$root.gen");
33 is ($generated_html, File::Slurp::read_file("$root.exp"), "HTML for same_as");