]> iEval git - html-element-library.git/blame - t/iter.t
first commit
[html-element-library.git] / t / iter.t
CommitLineData
67e78ff2 1# This might look like shell script, but it's actually -*- perl -*-
2use strict;
3use lib qw(t/ t/m/);
4
5
6use File::Slurp;
7use Test::More qw(no_plan);
8
9use TestUtils;
10use HTML::TreeBuilder;
11use HTML::Element::Library;
12
13my $root = 't/html/iter';
14
15my $tree = HTML::TreeBuilder->new_from_file("$root.html");
16
17my $li = $tree->look_down(class => 'store_items');
18
19my @items = qw(bread butter vodka);
20
21$tree->iter($li, @items);
22
23 my $generated_html = ptree($tree, "$root.gen");
24
25 is ($generated_html, File::Slurp::read_file("$root.exp"),
26 "HTML for generated li");
This page took 0.021456 seconds and 4 git commands to generate.