--- trunk/t/2-input-xml.t 2007/11/02 13:59:10 968 +++ trunk/t/2-input-xml.t 2007/11/04 16:47:03 998 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 12; +use Test::More tests => 24; BEGIN { use_ok( 'WebPAC::Test' ); @@ -22,16 +22,17 @@ throws_ok { $input->open( path => '/tmp/does_not_exit', %LOG ) } qr/can't find path/, 'open with non-existant path'; ok(my $db = $input->open( - path => "$abs_path/data/xml/" + path => "$abs_path/data/xml/", + mungle => "$abs_path/conf/mungle/xml.pl", ), "open"); 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");