]> iEval git - html-element-library.git/blobdiff - t/sibdex.t
Refactor tests (first pass)
[html-element-library.git] / t / sibdex.t
index 7c959f5d8457d4aea81965f5e642750e5a089a77..1181e06cd3ea1e6b096744f5723347d0340f4f3f 100644 (file)
@@ -1,32 +1,15 @@
-use strict;
-use Test::More qw(no_plan);
-
-use HTML::Element::Library;
-
-
-my $t1;
-my $lol;
-$t1 = HTML::Element->new_from_lol
-  (
-   $lol =
-   ['html',
-    ['head',
-     [ 'title', 'I like stuff!' ],
-    ],
-    ['body',
-     {
-      'lang', 'en-JP'},
-     'stuff',
-     ['p', 'um, p < 4!', {'class' => 'par123'}],
-     ['div', {foo => 'bar'}, '123'], # at 0.1.2
-     ['div', {jack => 'olantern'}, '456'], # at 0.1.2
-    ]
-   ]
-  )
-  ;
+#!/usr/bin/perl
+use t::lib tests => 1;
+
+my $t1 = HTML::Element->new_from_lol(
+       ['html',
+        ['head',
+         [ 'title', 'I like stuff!' ]],
+        ['body', {id => 'corpus'}, {'lang', 'en-JP'},
+         'stuff',
+         ['p', 'um, p < 4!', {'class' => 'par123'}],
+         ['div', {foo => 'bar'}, '123'], # at 0.1.2
+         ['div', {jack => 'olantern'}, '456']]]); # at 0.1.2
 
 my $p = $t1->look_down('_tag' => 'body')->look_down(_tag => 'p');
-
-is($p->sibdex, 1, "does the p tag have 1 as its index");
-
-
+is $p->sibdex, 1, 'p tag has 1 as its index';
This page took 0.023985 seconds and 4 git commands to generate.