X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=t%2Fwrap_content.t;fp=t%2Fwrap_content.t;h=7c766bcde64a4c98bdfa30b89f9d58cc582274bc;hb=aa0161264c67d7802e79492b05aff88533d79d20;hp=976420e2047f64180e9551c50892d709ff870185;hpb=e87db89a1b545ced3beb0bcd80dda173ec7c1084;p=html-element-library.git diff --git a/t/wrap_content.t b/t/wrap_content.t index 976420e..7c766bc 100644 --- a/t/wrap_content.t +++ b/t/wrap_content.t @@ -1,38 +1,18 @@ -use strict; -use Test::More qw(no_plan); +#!/usr/bin/perl +use t::lib tests => 1; -use HTML::Element::Library; - - -my $t1; -my $lol; -$t1 = HTML::Element->new_from_lol - ( - $lol = - ['html', - ['head', - [ 'title', 'I like stuff!' ], - ], - ['body', - { - 'lang', 'en-JP'}, - 'stuff', - ['p', - ['span', {id => 'wrapme'}, - 'um, p < 4!', - ], - {'class' => 'par123'}], - ['div', {foo => 'bar'}, '123'], # at 0.1.2 - ['div', {jack => 'olantern'}, '456'], # at 0.1.2 - ] - ] - ) - ; +my $t1 = HTML::Element->new_from_lol( + ['html', + ['head', + [ 'title', 'I like stuff!' ]], + ['body', {id => 'corpus'}, {'lang', 'en-JP'}, + 'stuff', + ['p', ['span', {id => 'wrapme'}, 'um, p < 4!'], {'class' => 'par123'}], + ['div', {foo => 'bar'}, '123'], # at 0.1.2 + ['div', {jack => 'olantern'}, '456']]]); # at 0.1.2 my $bold = HTML::Element->new('b', id => 'wrapper'); -my $W = $t1->look_down('id' => 'wrapme'); -$W->wrap_content($bold); -is( $W->as_HTML, 'um, p < 4!', "wrapped text"); - - +my $w = $t1->look_down('id' => 'wrapme'); +$w->wrap_content($bold); +isxml $w, \'um, p < 4!', 'wrap_content';