aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2026-06-06 12:26:27 -0400
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2026-06-06 12:26:27 -0400
commitb56c273d8198ae6cee69bbc9fe5a6a61da4074e4 (patch)
treef75b89299fe2783354ba0ab7e3ace088fa60245a /tests
parent4aec9800fca665713b0eba19f10af927b483332e (diff)
downloadbibutils-b56c273d8198ae6cee69bbc9fe5a6a61da4074e4.tar.gz
Code cleanup
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 70721db..8a9f49a 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -118,6 +118,12 @@ check "bib-convert refer->bibtex type guess" \
check "bib-convert refer->bibtex pages" \
sh -c "printf '%s' '$out' | grep -q ' pages = {433--460},'"
+# format detection is not fooled by a leading % comment (e.g. JabRef's
+# "% Encoding: UTF-8") in a bibtex file
+out=$(printf '%% Encoding: UTF-8\n%s\n' "$entry" | bib-convert)
+check "bib-convert detects bibtex behind %% comment" \
+ sh -c "printf '%s' '$out' | grep -q '^%A Donald E. Knuth$'"
+
# ---- bib-gen -----------------------------------------------------------
out=$(bib-gen -t book author='Xavier Yu' title='Some Title' year=2001 publisher='Pub')
check "bib-gen argument mode" \