From: Simon Elliott Date: Thu, 9 Jun 2011 16:30:26 +0000 (+0100) Subject: remove bad test add good one X-Git-Tag: release_0.009007_1~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FHTML-Zoom.git;a=commitdiff_plain;h=533bdc1b297a0ac1f0382e12ae960a73d7dd3908 remove bad test add good one --- diff --git a/t/bugs/after_void.t b/t/bugs/after_void.t new file mode 100644 index 0000000..a56cea1 --- /dev/null +++ b/t/bugs/after_void.t @@ -0,0 +1,25 @@ +use strictures 1; +use Test::More; + +use HTML::Zoom; + +my $tmpl = < + + +END + +my $tmpl2 = < +
cluck
+ +END + +my $z = HTML::Zoom->from_html($tmpl); +is( + $z->select('input') + ->add_before(\"
cluck
") + ->to_html, $tmpl2, +"added before void"); + +done_testing; diff --git a/t/bugs/form_helpers.t b/t/bugs/form_helpers.t deleted file mode 100644 index 5b674c1..0000000 --- a/t/bugs/form_helpers.t +++ /dev/null @@ -1,53 +0,0 @@ -use strictures 1; -use Test::More; - -use HTML::Zoom; - -my $tmpl =< -
- - - - - - - - - - -
- -END - -my $z = HTML::Zoom->from_html($tmpl); - -my @fields; -$z->select('input')->collect({ - into => \@fields, - passthrough => 1, -})->memoize; -is(scalar @fields,2,"correctly extracted all inputs"); - -my $expect; - -($expect = $tmpl) =~ s#name="input_field" />#name="input_field" />
cluck
#; - -is( - $z->select('input[name="input_field"]') - ->add_after(\"
cluck
") - ->to_html, $expect, -"added after void"); - -($expect = $tmpl) =~ s#Input#Input
cluck
#; - -is( - $z->select('input[name="input_field"]') - ->add_before(\"
cluck
") - ->to_html, $expect, -"added before void");