diff options
| author | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2026-06-06 12:26:27 -0400 |
|---|---|---|
| committer | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2026-06-06 12:26:27 -0400 |
| commit | b56c273d8198ae6cee69bbc9fe5a6a61da4074e4 (patch) | |
| tree | f75b89299fe2783354ba0ab7e3ace088fa60245a /tests/run-tests.sh | |
| parent | 4aec9800fca665713b0eba19f10af927b483332e (diff) | |
| download | bibutils-b56c273d8198ae6cee69bbc9fe5a6a61da4074e4.tar.gz | |
Code cleanup
Diffstat (limited to 'tests/run-tests.sh')
| -rwxr-xr-x | tests/run-tests.sh | 6 |
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" \ |