09951ab7bbfa0ee41b3dd152d0cc43d577331e93
[html-element-library.git] / t / passover.t
1 # This might look like shell script, but it's actually -*- perl -*-
2 use strict;
3
4 use File::Slurp;
5 use Test::More qw(no_plan);
6
7 use HTML::TreeBuilder;
8 use HTML::Element::Library;
9 use Test::XML;
10
11 sub replace_age {
12 my $branch = shift;
13 my $age = shift;
14 $branch->look_down(id => 'age')->replace_content($age);
15 }
16
17
18 sub tage {
19 my $age = shift;
20
21 my $tree = HTML::TreeBuilder->new_from_file('t/html/highlander2.html');
22
23 my $saved_child = $tree->passover('under18');
24
25 my $root = "t/html/highlander2-passover";
26
27 is_xml ($tree->as_XML, scalar File::Slurp::read_file("$root.exp"), "XML for $age");
28 }
29
30
31 tage('666');
32
This page took 0.023593 seconds and 3 git commands to generate.