X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2F2-input-dbf.t;h=2d5226a2ecc05a356a299971a6f175377820c2b4;hb=01091188dac765b18d9fb9bd84cad20ee4bd3e95;hp=25728ded4821ed5744fb7910a3549275f619781c;hpb=727ca22957a76a545113fc190b33530bea19c5ac;p=webpac2 diff --git a/t/2-input-dbf.t b/t/2-input-dbf.t index 25728de..2d5226a 100755 --- a/t/2-input-dbf.t +++ b/t/2-input-dbf.t @@ -1,38 +1,36 @@ #!/usr/bin/perl -w -use Test::More tests => 1179; -use Test::Exception; -use Cwd qw/abs_path/; -use blib; use strict; +use lib 'lib'; -use Data::Dump qw/dump/; - -my $debug = shift @ARGV; +use Test::More; BEGIN { -use_ok( 'WebPAC::Input' ); -} -ok(my $abs_path = abs_path($0), "abs_path"); -$abs_path =~ s#/[^/]*$#/#; + eval "use XBase"; + if ( $@ ) { + plan skip_all => "XBase required for WebPAC::Input::DBF"; + } else { + plan tests => 1179; + } + + use_ok( 'WebPAC::Test' ); + use_ok( 'WebPAC::Input' ); +} my $module = 'WebPAC::Input::DBF'; diag "testing with $module", $debug ? ' with debug' : ''; ok(my $input = new WebPAC::Input( module => $module, - no_log => $debug ? 0 : 1, no_progress_bar => 1, - debug => $debug, + %LOG ), "new"); ok(my $db = $input->open( path => "$abs_path/data/cas2000.dbf", input_config => { - xmapping => [ - { 'foobar' => [ '200', 'a' ] }, - ], + mapping_path => "$abs_path/conf/input/dbf/cas2000.yml", }, ), "open"); ok(my $size = $input->size, "size");