more tests
[catagits/HTML-Zoom.git] / t / selectors.t
index 2ce3c48..01e11cf 100644 (file)
@@ -68,4 +68,21 @@ is( HTML::Zoom->from_html('<div f="foo bar"></div>')
    '<div f="foo bar">grg</div>',
    'E[attr*="val"] works' );
 
+# sel1 sel2
+is( HTML::Zoom->from_html('<table><tr></tr><tr></tr></table>')
+   ->select('table tr')
+      ->replace_content(\'<td></td>')
+   ->to_html,
+   '<table><tr><td></td></tr><tr><td></td></tr></table>',
+   'sel1 sel2 works' );
+
+
+# sel1 sel2 sel3
+is( HTML::Zoom->from_html('<table><tr><td></td></tr><tr><td></td></tr></table>')
+   ->select('table tr td')
+      ->replace_content('frew')
+   ->to_html,
+   '<table><tr><td>frew</td></tr><tr><td>frew</td></tr></table>',
+   'sel1 sel2 sel3 works' );
+
 done_testing;