1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
|
|
|
use Test::More tests => 1179; |
|
|
use Test::Exception; |
|
|
use Cwd qw/abs_path/; |
|
|
use blib; |
|
3 |
use strict; |
use strict; |
4 |
|
use blib; |
5 |
|
|
6 |
use Data::Dump qw/dump/; |
use Test::More; |
|
|
|
|
my $debug = shift @ARGV; |
|
7 |
|
|
8 |
BEGIN { |
BEGIN { |
|
use_ok( 'WebPAC::Input' ); |
|
|
} |
|
9 |
|
|
10 |
ok(my $abs_path = abs_path($0), "abs_path"); |
eval "use XBase"; |
11 |
$abs_path =~ s#/[^/]*$#/#; #fix-vim |
if ( $@ ) { |
12 |
|
plan skip_all => "XBase required for WebPAC::Input::DBF"; |
13 |
|
} else { |
14 |
|
plan tests => 1179; |
15 |
|
} |
16 |
|
|
17 |
|
use_ok( 'WebPAC::Test' ); |
18 |
|
use_ok( 'WebPAC::Input' ); |
19 |
|
} |
20 |
|
|
21 |
my $module = 'WebPAC::Input::DBF'; |
my $module = 'WebPAC::Input::DBF'; |
22 |
diag "testing with $module", $debug ? ' with debug' : ''; |
diag "testing with $module", $debug ? ' with debug' : ''; |
23 |
|
|
24 |
ok(my $input = new WebPAC::Input( |
ok(my $input = new WebPAC::Input( |
25 |
module => $module, |
module => $module, |
|
no_log => $debug ? 0 : 1, |
|
26 |
no_progress_bar => 1, |
no_progress_bar => 1, |
27 |
debug => $debug, |
%LOG |
28 |
), "new"); |
), "new"); |
29 |
|
|
30 |
ok(my $db = $input->open( |
ok(my $db = $input->open( |