use strict;
use lib 'lib';
-use Test::More tests => 63;
+use Test::More tests => 102;
BEGIN {
use_ok( 'WebPAC::Test' );
diag "rec: ", dump($rec), "\n" if $debug;
}
+ok(my $db = $input->open(
+ path => "$abs_path/data/header_first.csv",
+ header_first => 1,
+), "open");
+ok(my $size = $input->size, "size");
+cmp_ok( $size, '==', 10 - 1, 'size header_first' );
+
+foreach my $mfn ( 1 ... $size ) {
+ my $rec = $input->fetch;
+ ok($rec, "fetch $mfn");
+ cmp_ok($rec->{'000'}->[0], '==', $mfn, 'has mfn');
+ cmp_ok($input->pos, '==', $mfn, "pos $mfn");
+
+ cmp_ok( $rec->{'A'}, 'eq', $rec->{'publication_title'}, 'A eq publication_title' );
+ diag "rec: ", dump($rec), "\n" if $debug;
+}
+