Skip to content

Commit

Permalink
test parent link of text nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 12, 2014
1 parent 47a1d32 commit b2170e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions t/mojo/dom.t
Expand Up @@ -39,20 +39,24 @@ is_deeply $dom->tree->[1][4][2], {a => 'b<c'}, 'right attributes';
is $dom->tree->[1][4][3], $dom->tree->[1], 'right parent';
is $dom->tree->[1][4][4][0], 'text', 'right element';
is $dom->tree->[1][4][4][1], 'ju', 'right text';
is $dom->tree->[1][4][5][0], 'tag', 'right element';
is $dom->tree->[1][4][5][1], 'baz', 'right tag';
is $dom->tree->[1][4][4][2], $dom->tree->[1][4], 'right parent';
is $dom->tree->[1][4][5][0], 'tag', 'right element';
is $dom->tree->[1][4][5][1], 'baz', 'right tag';
is_deeply $dom->tree->[1][4][5][2], {a23 => undef}, 'right attributes';
is $dom->tree->[1][4][5][3], $dom->tree->[1][4], 'right parent';
is $dom->tree->[1][4][5][4][0], 'text', 'right element';
is $dom->tree->[1][4][5][4][1], 's', 'right text';
is $dom->tree->[1][4][5][4][2], $dom->tree->[1][4][5], 'right parent';
is $dom->tree->[1][4][5][5][0], 'tag', 'right element';
is $dom->tree->[1][4][5][5][1], 'bazz', 'right tag';
is_deeply $dom->tree->[1][4][5][5][2], {}, 'empty attributes';
is $dom->tree->[1][4][5][5][3], $dom->tree->[1][4][5], 'right parent';
is $dom->tree->[1][4][5][6][0], 'text', 'right element';
is $dom->tree->[1][4][5][6][1], 't', 'right text';
is $dom->tree->[1][4][5][6][2], $dom->tree->[1][4][5], 'right parent';
is $dom->tree->[1][5][0], 'text', 'right element';
is $dom->tree->[1][5][1], 'works', 'right text';
is $dom->tree->[1][5][2], $dom->tree->[1], 'right parent';
is "$dom", <<EOF, 'right result';
<foo><bar a="b&lt;c">ju<baz a23>s<bazz></bazz>t</baz></bar>works</foo>
EOF
Expand Down

0 comments on commit b2170e8

Please sign in to comment.