diff options
Diffstat (limited to 'tests')
| -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" \ |