Refactor tests (first pass)
[html-element-library.git] / t / position.t
CommitLineData
aa016126
MG
1#!/usr/bin/perl
2use t::lib tests => 1;
67e78ff2 3
4my $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>
19EOHTML
20
aa016126
MG
21my $t1 = HTML::TreeBuilder->new_from_content ($html) ;
22my $found = $t1->look_down(id => 'findme');
67e78ff2 23
aa016126
MG
24my $pos = join ' ', $found->position;
25is $pos, '-1 1 0 1 2';
This page took 0.0106540000000001 seconds and 4 git commands to generate.