From ee50bf2b33e84fe9c7e4e56fd334969d2fbbced2 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 15 Mar 2024 08:28:47 +0300 Subject: [PATCH] #72 more tests --- perl-tests/checking.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/perl-tests/checking.pl b/perl-tests/checking.pl index ba94363..ad06ddc 100755 --- a/perl-tests/checking.pl +++ b/perl-tests/checking.pl @@ -26,18 +26,35 @@ package bibcop; use strict; use warnings; +# not enough fields fails((':type' => 'book', 'title' => 'The TeX Book')); fails((':type' => 'book', 'author' => 'Knuth, Donald')); fails((':type' => 'book', 'year' => '1984')); + +# dot inside title fails((':type' => 'misc', 'year' => '1984', 'author' => 'Jeff', 'title' => '{Comm. of the ACM}')); + +# wrong author name fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth, Donald E', 'title' => '{CACM}')); + +# year inside title fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth', 'title' => '{1984 CACM}')); + +# dot inside title fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth', 'title' => '{CACM.}')); + +# wrong format of pages fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth', 'title' => '{CACM}', 'pages'=>'4a')); fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth', 'title' => '{CACM}', 'pages'=>'4-5')); fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth', 'title' => '{CACM}', 'pages'=>'54--21')); + +# redundant space in title fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth', 'title' => '{The Article , a Good One}')); + +# wrong doi fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth', 'title' => '{The Title}', 'doi' => 'http://dx.doi.org/1/1')); + +# wrong capitalization fails((':type' => 'misc', 'year' => '1984', 'author' => 'Knuth', 'title' => '{Object-oriented Programming}')); passes((