X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2F002_isis.t;h=72f03989a969fb6c01a475c510843af96a673100;hb=cb1611b5c52327429c52a44b28f228bb34701933;hp=65944915c0d908fd5c9455be00ba7e60e89542eb;hpb=c9611dfe337a4eb721fba8629672c725d7bec729;p=Biblio-Isis diff --git a/t/002_isis.t b/t/002_isis.t index 6594491..72f0398 100755 --- a/t/002_isis.t +++ b/t/002_isis.t @@ -6,16 +6,21 @@ use blib; use Data::Dumper; use Test::More tests => 110; +use File::Spec; -BEGIN { use_ok( 'IsisDB' ); } +BEGIN { use_ok( 'Biblio::Isis' ); } +my $debug = shift @ARGV; my $isis; +my $path_winisis = File::Spec->catfile('data', 'winisis', 'BIBL'); +my $path_isismarc = File::Spec->catfile('data', 'isismarc', 'BIBL'); + sub test_data { my $args = {@_}; - isa_ok ($isis, 'IsisDB'); + isa_ok ($isis, 'Biblio::Isis'); cmp_ok($isis->count, '==', 5, "count is 5"); @@ -121,9 +126,10 @@ sub test_data { } -$isis = IsisDB->new ( - isisdb => './data/winisis/BIBL', +$isis = Biblio::Isis->new ( + isisdb => $path_winisis, include_deleted => 1, + debug => $debug, ); print Dumper($isis); @@ -139,8 +145,8 @@ test_data( ) ], ); -$isis = IsisDB->new ( - isisdb => './data/isismarc/BIBL', +$isis = Biblio::Isis->new ( + isisdb => $path_isismarc, include_deleted => 1, ); @@ -156,16 +162,17 @@ test_data( # check logically deleted -$isis = IsisDB->new ( - isisdb => './data/winisis/BIBL', +$isis = Biblio::Isis->new ( + isisdb => $path_winisis, include_deleted => 1, ); ok($isis->fetch(3), "deleted found"); cmp_ok($isis->{deleted}, '==', 3, "MFN 3 is deleted"); -$isis = IsisDB->new ( - isisdb => './data/winisis/BIBL', +$isis = Biblio::Isis->new ( + isisdb => $path_winisis, + debug => $debug, ); ok(! $isis->fetch(3), "deleted not found");