X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fselectors.t;h=8a800b1c6ecc0497d179ad0c3658b973c7fadfb1;hb=8af6dead371dda2793a0649592cfa0dcf905e5bc;hp=e6be2c229704013e613a8d3cac6a110797d3d8e6;hpb=24725e7b32b680b376c06b1f9d641ec11fc1d067;p=catagits%2FHTML-Zoom.git diff --git a/t/selectors.t b/t/selectors.t index e6be2c2..8a800b1 100644 --- a/t/selectors.t +++ b/t/selectors.t @@ -40,6 +40,14 @@ is( HTML::Zoom->from_html('
'.$stub) '
grg
'.$stub, 'E[attr] works' ); +# *[attr] +is( HTML::Zoom->from_html('
'.$stub) + ->select('*[frew]') + ->replace_content('grg') + ->to_html, + '
grg
grg'.$stub, + '*[attr] works' ); + # el[attr="foo"] is( HTML::Zoom->from_html('
'.$stub) ->select('div[frew="yo"]') @@ -104,6 +112,16 @@ is( HTML::Zoom->from_html('
'.$stub) '
grg
'.$stub, 'E[attr~="val"] works' ); +# el[attr|="foo"] +is( HTML::Zoom->from_html('
'. + '
'.$stub) + ->select('div[lang|="en"]') + ->replace_content('grg') + ->to_html, + '
'. + '
grg
grg
'.$stub, + 'E[attr|="val"] works' ); + # [attr=bar] ok( check_select( '[prop=moo]'), '[attr=bar]' );