]> iEval git - html-element-library.git/blob - t/position.t
first commit
[html-element-library.git] / t / position.t
1 use strict;
2 use Test::More qw(no_plan);
3
4 use HTML::TreeBuilder;
5 use HTML::Element::Library;
6
7 my $html =<<'EOHTML';
8 <html>
9 <head>
10 </head>
11 <body>
12 <table>
13 <tr>
14 <td>a <td>a <td>a <td>a
15 </tr>
16 <tr>
17 <td>a <td>a <td id=findme>a <td>a
18 </tr>
19 </table>
20 </body>
21 </html>
22 EOHTML
23
24 my $t1;
25 my $lol;
26
27 $t1 = HTML::TreeBuilder->new_from_content ( $html ) ;
28
29 my $found= $t1->look_down(id => 'findme');
30
31
32 my @found = $found->position;
33 #warn "@found";
34
35 is("@found", '-1 1 0 1 2');
36
37
This page took 0.04601 seconds and 4 git commands to generate.