fix offset to skip records just like SQL databases do, and not position us on it
[webpac2] / t / 2-input-dbf.t
index 4ae1597..2d5226a 100755 (executable)
@@ -1,30 +1,30 @@
 #!/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#/[^/]*$#/#;     #fix-vim        
+       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(