Bug#545823: bibtool: check.rule bug (BibTool ERROR: Unexpected end of braces.)
Package: bibtool
Version: 2.48alpha.2-4
Severity: normal
bibtool accepts
check.rule { year "." "\$: bad year\n" }
but not
check.rule { year "" "\$: bad year\n" }
even though the latter form is chosen as an example in the reference
manual (/usr/share/doc/bibtool/bibtool.dvi.gz Section A.11.2).
To reproduce the bug:
------------------------------------------------------------------
#!/bin/sh
set -ex
bibtool -- 'check.rule { year "2008" }' -- 'check.rule { year "." "\$: bad year\n" }' sample.bib > /dev/null
bibtool -- 'check.rule { year "2008" }' -- 'check.rule { year "" "\$: bad year\n" }' sample.bib > /dev/null
------------------------------------------------------------------
with the sample.bib file:
------------------------------------------------------------------
@article{Article1,
author = {Author 1},
title = {Title 1},
journal = {Journal 1},
year = {2008}
}
@article{Article2,
author = {Author 2},
title = {Title 2},
journal = {Journal 2},
year = {2009}
}
------------------------------------------------------------------
I get the following output:
+ bibtool -- 'check.rule { year "2008" }' -- 'check.rule { year "." "\$: bad year\n" }' sample.bib
*** BibTool: article2: bad year
+ bibtool -- 'check.rule { year "2008" }' -- 'check.rule { year "" "\$: bad year\n" }' sample.bib
check.rule { year "" "\$: bad year\n" }
_______________________________________^
*** BibTool ERROR: Unexpected end of braces.
year "" "\$: bad year\n" }
__________________________^
*** BibTool ERROR: Unexpected characters at end of string.
*** BibTool: article2: bad year
-- System Information:
Debian Release: squeeze/sid
APT prefers oldstable
APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26.5-20080922 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages bibtool depends on:
ii libc6 2.9-26 GNU C Library: Shared libraries
ii libkpathsea4 2007.dfsg.2-6 TeX Live: path search library for
bibtool recommends no packages.
bibtool suggests no packages.
-- no debconf information
Reply to: