Refactor tests (first pass)
[html-element-library.git] / t / newchild.t
CommitLineData
271d5078 1#!/usr/bin/perl -T
aa016126
MG
2use lib '.';
3use t::lib tests => 1;
271d5078 4
aa016126
MG
5my @list = map { [item => $_] } qw/bread butter beans/;
6my $initial_lol = [ note => [ list => [ item => 'sample' ] ] ];
7my ($new_lol) = HTML::Element::newchild($initial_lol, list => @list);
271d5078 8
aa016126
MG
9my $expected = [note => [list => [item => 'bread'], [item => 'butter'], [item => 'beans']]];
10Test::More::is_deeply($new_lol, $expected, 'test unrolling');
This page took 0.009809 seconds and 4 git commands to generate.