1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl HTML-Element-Library.t'
8 use Test::More qw(no_plan);
10 use HTML::Element::Library;
15 $t1 = HTML::Element->new_from_lol
20 [ 'title', 'I like stuff!' ],
26 ['p', 'um, p < 4!', {'class' => 'par123'}],
27 ['div', {foo => 'bar'}, '123'], # at 0.1.2
28 ['div', {jack => 'olantern'}, '456'], # at 0.1.2
34 my $div = $t1->look_down('_tag' => 'body')->look_down(_tag => 'p');
35 my @sibs = $div->siblings;
37 is($sibs[0], 'stuff', "first sibling is simple text");
38 is($sibs[2]->tag, 'div', "3rd tag a div tag");
39 is(scalar @sibs, 4, "4 siblings total");