add strictures commit (out of order)
[catagits/HTML-Zoom.git] / t / selectors.t
index 41699bf..5c8a380 100644 (file)
@@ -1,5 +1,4 @@
-use strict;
-#use warnings FATAL => 'all';
+use strictures 1;
 use Test::More;
 
 use HTML::Zoom;
@@ -40,6 +39,14 @@ is( HTML::Zoom->from_html('<div frew="yo"></div>'.$stub)
    '<div frew="yo">grg</div>'.$stub,
    'E[attr] works' );
 
+# *[attr]
+is( HTML::Zoom->from_html('<div frew="yo"></div><span frew="ay"></span>'.$stub)
+   ->select('*[frew]')
+      ->replace_content('grg')
+   ->to_html,
+   '<div frew="yo">grg</div><span frew="ay">grg</span>'.$stub,
+   '*[attr] works' );
+
 # el[attr="foo"]
 is( HTML::Zoom->from_html('<div frew="yo"></div>'.$stub)
    ->select('div[frew="yo"]')