r1525@llin: dpavlin | 2007-11-04 15:34:13 +0100
[webpac2] / t / 2-input-dbf.t
index 25728de..45675ca 100755 (executable)
@@ -1,38 +1,28 @@
 #!/usr/bin/perl -w
 
-use Test::More tests => 1179;
-use Test::Exception;
-use Cwd qw/abs_path/;
-use blib;
 use strict;
+use blib;
 
-use Data::Dump qw/dump/;
-
-my $debug = shift @ARGV;
+use Test::More tests => 1179;
 
 BEGIN {
+use_ok( 'WebPAC::Test' );
 use_ok( 'WebPAC::Input' );
 }
 
-ok(my $abs_path = abs_path($0), "abs_path");
-$abs_path =~ s#/[^/]*$#/#;
-
 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");