1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/bin/bash
set -e
pkg="bibutils"
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi
cp debian/tests/Biblio.bib "${AUTOPKGTEST_TMP}"
cd "${AUTOPKGTEST_TMP}"
# Three round-trips with conversions
bib2xml Biblio.bib | xml2bib > Bibliobxb.bib
bib2xml Biblio.bib | xml2end | end2xml | xml2bib > Bibliobxexb.bib
bib2xml Biblio.bib | xml2ris | ris2xml | xml2bib > Bibliobxrxb.bib
#Some tests
grep -E "(A|a)rticle.*stanton" Bibliobxb.bib
grep -E "(A|a)rticle.*stanton" Bibliobxexb.bib
grep -E "(A|a)rticle.*stanton" Bibliobxrxb.bib
grep -E "title.*econometrics" Bibliobxb.bib
grep -E "title.*econometrics" Bibliobxexb.bib
grep -E "title.*econometrics" Bibliobxrxb.bib
|