test for collect on void element
Simon Elliott [Mon, 13 Jun 2011 12:23:44 +0000 (13:23 +0100)]
t/bugs/void.t [moved from t/bugs/after_void.t with 72% similarity]

similarity index 72%
rename from t/bugs/after_void.t
rename to t/bugs/void.t
index ae3e9f7..520f15c 100644 (file)
@@ -16,6 +16,15 @@ my $tmpl2 = <<END;
 END
 
 my $z = HTML::Zoom->from_html($tmpl);
+
+my $count = 0;
+$z->select('input')->collect({
+  filter => sub { $count++; $_ },
+  passthrough => 1,
+})->run;
+
+is($count, 1,"collect on void");
+
 is(
   $z->select('input')
   ->add_before(\"<div>cluck</div>")