added offset and limit [0.02]
[webpac2] / t / 2-input-xml.t
index 2dae39f..ccc44f7 100755 (executable)
@@ -1,9 +1,9 @@
 #!/usr/bin/perl -w
 
 use strict;
-use blib;
+use lib 'lib';
 
-use Test::More tests => 18;
+use Test::More tests => 24;
 
 BEGIN {
 use_ok( 'WebPAC::Test' );
@@ -29,10 +29,10 @@ ok(my $size = $input->size, "size");
 
 foreach my $mfn ( 1 ... $size ) {
        my $rec = $input->fetch;
-       if ($mfn <= 10 || $mfn == 20) {
-               ok($rec, "fetch $mfn");
+       if ( $mfn >= 7 ) {
+               ok(! $rec, "error $mfn");
        } else {
-               ok(! $rec, "empty $mfn");
+               ok($rec, "fetch $mfn");
        }
 
        cmp_ok($input->pos, '==', $mfn, "pos $mfn");