aboutsummaryrefslogtreecommitdiffstats
path: root/tests/run-tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-tests.sh')
-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" \