]> iEval git - html-element-library.git/blob - t/dual_iter.t
Refactor tests (first pass)
[html-element-library.git] / t / dual_iter.t
1 #!/usr/bin/perl
2 use t::lib tests => 1;
3
4 my $tree = mktree 't/html/dual_iter.html';
5
6 $tree->iter2(
7 wrapper_data => [
8 ['the pros' => 'never have to worry about service again'],
9 ['the cons' => 'upfront extra charge on purchase'],
10 ['our choice' => 'go with the extended service plan']
11 ],
12 wrapper_proc => sub {
13 my ($container) = @_;
14 # only keep the last 2 dts and dds
15 my @content_list = $container->content_list;
16 $container->splice_content(0, @content_list - 2);
17 },
18 splice => sub {
19 my ($container, @item_elems) = @_;
20 $container->unshift_content(@item_elems);
21 },
22 debug => $ENV{TEST_VERBOSE},
23 );
24
25 isxml $tree, 't/html/dual_iter.exp', 'dual_iter';
This page took 0.052435 seconds and 4 git commands to generate.