1 # This might look like shell script, but it's actually -*- perl -*-
7 use Test::More qw(no_plan);
10 use HTML::TreeBuilder;
11 use HTML::Element::Library;
13 my $root = 't/html/iter2';
15 my $tree = HTML::TreeBuilder->new_from_file("$root.html");
18 [ Programmer => 'one who likes Perl and Seamstress', ],
19 [ DBA => 'one who does business as', ],
20 [ Admin => 'one who plays Tetris all day' ]
24 # default wrapper_ld ok
25 wrapper_data => \@items,
29 # only keep the last 2 dts and dds
30 my @content_list = $container->content_list;
31 $container->splice_content(0, @content_list - 2);
33 # default item_ld is k00l
34 # default item_data is phrEsh
35 # default item_proc will do w0rk
37 my ($container, @item_elems) = @_;
38 $container->unshift_content(@item_elems);
45 my $generated_html = ptree($tree, "$root.gen");
47 is ($generated_html, File::Slurp::read_file("$root.exp"),
48 "HTML for generated li");