From e60b14a6092e1341c96d6d586b0d6968502b1dae Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 25 Jul 2019 11:56:04 +0200 Subject: [PATCH] added test file --- t/2-input-tsv.t | 3 ++- t/data/header_first.tsv | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 t/data/header_first.tsv diff --git a/t/2-input-tsv.t b/t/2-input-tsv.t index 112172a..0d2be5e 100755 --- a/t/2-input-tsv.t +++ b/t/2-input-tsv.t @@ -40,7 +40,7 @@ foreach my $mfn ( 1 ... $size ) { } 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"); @@ -53,3 +53,4 @@ foreach my $mfn ( 1 ... $size ) { 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 index 0000000..8c5d585 --- /dev/null +++ b/t/data/header_first.tsv @@ -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 +Annual Review of Analytical Chemistry 1936-1327 1936-1335 2008 1 https://www.annualreviews.org/journal/anchem anchem fulltext Annual Reviews +Annual Review of Animal Biosciences 2165-8102 2165-8110 2013 1 https://www.annualreviews.org/journal/animal animal fulltext Annual Reviews +Annual Review of Anthropology 0084-6570 1545-4290 1972 1 https://www.annualreviews.org/journal/anthro anthro fulltext Annual Reviews +Annual Review of Astronomy and Astrophysics 0066-4146 1545-4282 1963 1 https://www.annualreviews.org/journal/astro astro fulltext Annual Reviews +Annual Review of Biochemistry 0066-4154 1545-4509 1932 1 https://www.annualreviews.org/journal/biochem biochem fulltext Annual Reviews +Annual Review of Biomedical Data Science n/a 2574-3414 2018 1 https://www.annualreviews.org/journal/biodatasci biodatasci fulltext Annual Reviews +Annual Review of Biomedical Engineering 1523-9829 1545-4274 1999 1 https://www.annualreviews.org/journal/bioeng bioeng fulltext Annual Reviews +Annual Review of Biophysics 1936-122X 1936-1238 2008 37 https://www.annualreviews.org/journal/biophys biophys fulltext Annual Reviews +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 -- 2.20.1