Debian Codegraph @

texk/bibtex-x/tests/bibtex8-sort.test

raw
1 #! /bin/sh -vx
2 # $Id$
3 # Copyright 2017 Karl Berry <[email protected]>
4 # Copyright 2010 Peter Breitenlohner <[email protected]>
5 # You may freely use, modify and/or distribute this file.
6
7 # Using test data from Philipp Lehman <[email protected]>
8
9 BinDir=${BinDir:-.}
10 ExeExt=${ExeExt:-}
11 _bibtex8=$BinDir/bibtex8$ExeExt
12
13 test -d tests || mkdir -p tests
14
15 rc=0
16
17 TEXMFCNF=$srcdir/../kpathsea
18 BSTINPUTS=$srcdir/tests
19 BIBINPUTS=$srcdir/tests
20 export TEXMFCNF BSTINPUTS BIBINPUTS
21
22 rm -f tests/xsort[123].bbl tests/xcase[123].bbl
23
24 for i in 1 2 3; do
25
26 ## test for sorting and change.case$
27 cp $srcdir/tests/sort.aux tests/xsort$i.aux
28 $_bibtex8 --csfile sort$i.csf tests/xsort$i || rc=1
29 diff $srcdir/tests/sort$i.bbl tests/xsort$i.bbl || rc=2
30
31 ## test for change.case$
32 cp $srcdir/tests/casea.aux tests/xcase$i.aux
33 $_bibtex8 --csfile sort$i.csf tests/xcase$i || rc=3
34 diff $srcdir/tests/casea.bbl tests/xcase$i.bbl || rc=4
35
36 done
37
38
39 exit $rc
40