]> iEval git - html-element-library.git/blob - t/position.t
Refactor tests (first pass)
[html-element-library.git] / t / position.t
1 #!/usr/bin/perl
2 use t::lib tests => 1;
3
4 my $html =<<'EOHTML';
5 <html>
6 <head>
7 </head>
8 <body>
9 <table>
10 <tr>
11 <td>a <td>a <td>a <td>a
12 </tr>
13 <tr>
14 <td>a <td>a <td id=findme>a <td>a
15 </tr>
16 </table>
17 </body>
18 </html>
19 EOHTML
20
21 my $t1 = HTML::TreeBuilder->new_from_content ($html) ;
22 my $found = $t1->look_down(id => 'findme');
23
24 my $pos = join ' ', $found->position;
25 is $pos, '-1 1 0 1 2';
This page took 0.049971 seconds and 4 git commands to generate.