]> iEval git - html-element-library.git/blame - t/position.t
fixed content_handler.t
[html-element-library.git] / t / position.t
CommitLineData
67e78ff2 1use strict;
2use Test::More qw(no_plan);
3
4use HTML::TreeBuilder;
5use HTML::Element::Library;
6
7my $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>
22EOHTML
23
24my $t1;
25my $lol;
26
27$t1 = HTML::TreeBuilder->new_from_content ( $html ) ;
28
29my $found= $t1->look_down(id => 'findme');
30
31
32my @found = $found->position;
33#warn "@found";
34
35is("@found", '-1 1 0 1 2');
36
37
This page took 0.0233 seconds and 4 git commands to generate.