From b56c273d8198ae6cee69bbc9fe5a6a61da4074e4 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Sat, 6 Jun 2026 12:26:27 -0400 Subject: Code cleanup --- tests/run-tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/run-tests.sh') 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" \ -- cgit v1.2.3