Refactor tests (first pass)
[html-element-library.git] / t / iter2.t
1 #!/usr/bin/perl
2 use t::lib tests => 1;
3
4 my $tree = mktree 't/html/iter2.html';
5
6 $tree->iter2(
7 # default wrapper_ld ok
8 wrapper_data => [
9 [ Programmer => 'one who likes Perl and Seamstress' ],
10 [ DBA => 'one who does business as' ],
11 [ Admin => 'one who plays Tetris all day' ]
12 ],
13 wrapper_proc => sub {
14 my ($container) = @_;
15
16 # only keep the last 2 dts and dds
17 my @content_list = $container->content_list;
18 $container->splice_content(0, @content_list - 2);
19 },
20 # default item_ld is k00l
21 # default item_data is phrEsh
22 # default item_proc will do w0rk
23 splice => sub {
24 my ($container, @item_elems) = @_;
25 $container->unshift_content(@item_elems);
26 },
27
28 debug => $ENV{TEST_VERBOSE},
29 );
30
31 isxml $tree, 't/html/iter2.exp', 'iter2';
This page took 0.023782 seconds and 4 git commands to generate.