1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
|
|
3 |
use Test::More tests => 4; |
use Test::More tests => 6; |
4 |
use Test::Exception; |
use Test::Exception; |
5 |
|
use Cwd qw/abs_path/; |
6 |
use blib; |
use blib; |
7 |
use strict; |
use strict; |
8 |
|
|
10 |
use_ok( 'WebPAC::Input::ISIS' ); |
use_ok( 'WebPAC::Input::ISIS' ); |
11 |
} |
} |
12 |
|
|
13 |
|
ok(my $abs_path = abs_path($0), "abs_path"); |
14 |
|
$abs_path =~ s#/[^/]*$#/#; |
15 |
|
|
16 |
ok(my $isis = new WebPAC::Input::ISIS(), "new"); |
ok(my $isis = new WebPAC::Input::ISIS(), "new"); |
17 |
|
|
18 |
throws_ok { $isis->open() } qr/filename/, "need filename"; |
throws_ok { $isis->open() } qr/filename/, "need filename"; |
19 |
|
|
20 |
throws_ok { $isis->open( filename => '/dev/null' ) } qr/can't find database/ , "open"; |
throws_ok { $isis->open( filename => '/dev/null' ) } qr/can't find database/ , "open"; |
21 |
|
|
22 |
|
ok($isis->open( filename => "$abs_path/winisis/BIBL" ), "open"); |