#!/usr/bin/perl -T
use lib '.';
-use t::lib tests => 26;
+use t::lib tests => 27;
##################################################
# Short tests based on mklol
###
+sub cb {
+ my ($data, $tr) = @_;
+ $tr->look_down(class => 'first')->replace_content($data->{first});
+ $tr->look_down(class => 'last')->replace_content($data->{last});
+ $tr->look_down(class => 'option')->replace_content($data->{option});
+}
+
+my @cbdata = (
+ {first => 'Foo', last => 'Bar', option => 2},
+ {first => 'Bar', last => 'Bar', option => 3},
+ {first => 'Baz', last => 'Bar', option => 4},
+);
+
+$tree = mktree 't/html/itercb.html';
+$tree->find('table')->find('tbody')->find('tr')->itercb(\@cbdata, \&cb);
+isxml $tree, 't/html/itercb-exp.html', 'itercb';
+
+###
+
for my $age (qw/5 15 50/) {
$tree = mktree 't/html/highlander.html';
$tree->highlander(