is( check_select('span[class=career],[prop=moo]'), 2,
'Multiple selectors: el[attr=bar],[attr=foo]');
+TODO:{
+ local $TODO = 'Fix selector error messages';
+ # selector parse error test:
+ eval{
+ HTML::Zoom->from_html('<span att="bar"></span>')
+ ->select('[att=bar')
+ ->replace_content('cats')
+ ->to_html;
+ };
+ like( $@, qr/Error parsing dispatch specification/,
+ 'Malformed attribute selector results in a helpful error' );
+};
+
=pod
# sel1 sel2
'<table><tr><td>frew</td></tr><tr><td>frew</td></tr></table>',
'sel1 sel2 sel3 works' );
+
+
=cut
done_testing;
->from_html($tmpl)
->select(shift)->replace("the monkey")->to_html;
my $count = 0;
- while ( $output =~ /\G?.*the monkey/gc ){
+ while ( $output =~ /the monkey/g ){
$count++;
}
return $count;