added test file
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 25 Jul 2019 09:56:04 +0000 (11:56 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 25 Jul 2019 09:56:04 +0000 (11:56 +0200)
t/2-input-tsv.t
t/data/header_first.tsv [new file with mode: 0644]

index 112172a..0d2be5e 100755 (executable)
@@ -40,7 +40,7 @@ foreach my $mfn ( 1 ... $size ) {
 }
 
 ok(my $db = $input->open(
 }
 
 ok(my $db = $input->open(
-       path => "$abs_path/data/header.tsv",
+       path => "$abs_path/data/header_first.tsv",
        header_first => 1,
 ), "open header_first");
 ok(my $size = $input->size, "size");
        header_first => 1,
 ), "open header_first");
 ok(my $size = $input->size, "size");
@@ -53,3 +53,4 @@ foreach my $mfn ( 1 ... $size ) {
        ok( $rec->{'publication_title'}, 'has publication_title' );
        diag "rec: ", dump($rec), "\n" if $debug;
 }
        ok( $rec->{'publication_title'}, 'has publication_title' );
        diag "rec: ", dump($rec), "\n" if $debug;
 }
+
diff --git a/t/data/header_first.tsv b/t/data/header_first.tsv
new file mode 100644 (file)
index 0000000..8c5d585
--- /dev/null
@@ -0,0 +1,10 @@
+publication_title      print_identifier        online_identifier       date_first_issue_online num_first_vol_online    num_first_issue_online  date_last_issue_online  num_last_vol_online     num_last_issue_online   title_url       first_author    title_id        embargo_info    coverage_depth  coverage_notes  publisher_name                          \r
+Annual Review of Analytical Chemistry  1936-1327       1936-1335       2008    1                                       https://www.annualreviews.org/journal/anchem            anchem          fulltext                Annual Reviews                          \r
+Annual Review of Animal Biosciences    2165-8102       2165-8110       2013    1                                       https://www.annualreviews.org/journal/animal            animal          fulltext                Annual Reviews                          \r
+Annual Review of Anthropology  0084-6570       1545-4290       1972    1                                       https://www.annualreviews.org/journal/anthro            anthro          fulltext                Annual Reviews                          \r
+Annual Review of Astronomy and Astrophysics    0066-4146       1545-4282       1963    1                                       https://www.annualreviews.org/journal/astro             astro           fulltext                Annual Reviews                          \r
+Annual Review of Biochemistry  0066-4154       1545-4509       1932    1                                       https://www.annualreviews.org/journal/biochem           biochem         fulltext                Annual Reviews                          \r
+Annual Review of Biomedical Data Science       n/a     2574-3414       2018    1                                       https://www.annualreviews.org/journal/biodatasci                biodatasci              fulltext                Annual Reviews                          \r
+Annual Review of Biomedical Engineering        1523-9829       1545-4274       1999    1                                       https://www.annualreviews.org/journal/bioeng            bioeng          fulltext                Annual Reviews                          \r
+Annual Review of Biophysics    1936-122X       1936-1238       2008    37                                      https://www.annualreviews.org/journal/biophys           biophys         fulltext                Annual Reviews                          \r
+Annual Review of Biophysics and Biomolecular Structure 1056-8700               1992    21              2007    36              https://www.annualreviews.org/journal/biophys           biophys         fulltext        Title change    Annual Reviews                          \r