Skip to content

Commit

Permalink
#29 pages comparing fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 17, 2023
1 parent 32c72f3 commit f180276
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bibcop.pl
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ sub check_pages {
if ($parts[0] eq $parts[1]) {
return "The 'pages' mentions the same page twice, just use it once"
}
if ($parts[0] gt $parts[1]) {
return "The 'pages' are in the wrong order"
if ($parts[0] > $parts[1]) {
return "The 'pages' are in the wrong order, since $parts[0] is greater than $parts[1]"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion perl-tests/checking.pl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ package bibcop;
'year' => '1984',
'volume' => '32',
'doi' => '10.5555/1102013',
'pages' => '22--33'
'pages' => '89--100'
));
passes((
':type' => 'inproceedings',
Expand Down
1 change: 1 addition & 0 deletions perl-tests/checks.pl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ package bibcop;
check_fails($f, ('pages' => '32--12'));
check_passes($f, ('pages' => '123'));
check_passes($f, ('pages' => '42--43'));
check_passes($f, ('pages' => '89--100'));

$f = 'check_type_capitalization';
check_fails($f, (':type' => 'Article'));
Expand Down

0 comments on commit f180276

Please sign in to comment.