Refactor tests (first pass)
[html-element-library.git] / t / dual_iter.t
CommitLineData
aa016126
MG
1#!/usr/bin/perl
2use t::lib tests => 1;
67e78ff2 3
aa016126 4my $tree = mktree 't/html/dual_iter.html';
67e78ff2 5
6$tree->iter2(
aa016126
MG
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
25isxml $tree, 't/html/dual_iter.exp', 'dual_iter';
This page took 0.010141 seconds and 4 git commands to generate.