use strict;
use blib;
-use Test::More tests => 12;
+use Test::More tests => 24;
BEGIN {
use_ok( 'WebPAC::Test' );
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");