]> iEval git - html-element-library.git/blobdiff - t/position.t
Refactor tests (first pass)
[html-element-library.git] / t / position.t
index b48463defd99ea70cf016a55e0bd59bfe250c51b..93dbfb5897ec0bea74c1e0bb23718adf6959493e 100644 (file)
@@ -1,8 +1,5 @@
-use strict;
-use Test::More qw(no_plan);
-
-use HTML::TreeBuilder;
-use HTML::Element::Library;
+#!/usr/bin/perl
+use t::lib tests => 1;
 
 my $html =<<'EOHTML';
 <html>
@@ -21,17 +18,8 @@ my $html =<<'EOHTML';
 </html>
 EOHTML
 
-my $t1;
-my $lol;
-
-$t1 = HTML::TreeBuilder->new_from_content ( $html ) ;
-
-my $found= $t1->look_down(id => 'findme');
-
-
-my @found = $found->position;
-#warn "@found";
-
-is("@found", '-1 1 0 1 2');
-
+my $t1 = HTML::TreeBuilder->new_from_content ($html) ;
+my $found = $t1->look_down(id => 'findme');
 
+my $pos = join ' ', $found->position;
+is $pos, '-1 1 0 1 2';
This page took 0.025067 seconds and 4 git commands to generate.