Skip to content

Commit

Permalink
better tests for Mojo::DOM::CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 16, 2013
1 parent 744996e commit 78ca6d1
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions t/mojo/dom.t
Expand Up @@ -2127,26 +2127,27 @@ EOF
is $dom->find('a[accesskey]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey]')->[1]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey]')->[2], undef, 'no result';
is $dom->find('a[accesskey="0"]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey="0"]')->[1], undef, 'no result';
is $dom->find('a[accesskey^="0"]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey^="0"]')->[1], undef, 'no result';
is $dom->find('a[accesskey$="0"]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey$="0]')->[1], undef, 'no result';
is $dom->find('a[accesskey~="0"]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey~="0]')->[1], undef, 'no result';
is $dom->find('a[accesskey*="0"]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey*="0]')->[1], undef, 'no result';
is $dom->find('a[accesskey="1"]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey="1"]')->[1], undef, 'no result';
is $dom->find('a[accesskey^="1"]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey^="1"]')->[1], undef, 'no result';
is $dom->find('a[accesskey$="1"]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey$="1]')->[1], undef, 'no result';
is $dom->find('a[accesskey~="1"]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey~="1]')->[1], undef, 'no result';
is $dom->find('a[accesskey*="1"]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey*="1]')->[1], undef, 'no result';
is $dom->find('a[accesskey=0]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey=0]')->[1], undef, 'no result';
is $dom->find('a[accesskey^=0]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey^=0]')->[1], undef, 'no result';
is $dom->find('a[accesskey$=0]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey$=0]')->[1], undef, 'no result';
is $dom->find('a[accesskey~=0]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey~=0]')->[1], undef, 'no result';
is $dom->find('a[accesskey*=0]')->[0]->text, 'Zero', 'right text';
is $dom->find('a[accesskey*=0]')->[1], undef, 'no result';
is $dom->find('a[accesskey=1]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey=1]')->[1], undef, 'no result';
is $dom->find('a[accesskey^=1]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey^=1]')->[1], undef, 'no result';
is $dom->find('a[accesskey$=1]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey$=1]')->[1], undef, 'no result';
is $dom->find('a[accesskey~=1]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey~=1]')->[1], undef, 'no result';
is $dom->find('a[accesskey*=1]')->[0]->text, 'O&gTn>e', 'right text';
is $dom->find('a[accesskey*=1]')->[1], undef, 'no result';
is $dom->at('a[accesskey*="."]'), undef, 'no result';

# Empty attribute value
$dom = Mojo::DOM->new->parse(<<EOF);
Expand Down

0 comments on commit 78ca6d1

Please sign in to comment.