summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir/pbibtex.test
blob: 2df3d8aa5f25a34665005092754ae6706fd2421d (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2010-2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

test -d ptests || mkdir -p ptests
rm -f ptests/xexampl.* ptests/xenc*.*

rc=0

./pbibtex -version || rc=100

TEXMFCNF=$srcdir/../kpathsea
BSTINPUTS=$srcdir/tests
BIBINPUTS=$srcdir/tests
export TEXMFCNF BSTINPUTS BIBINPUTS

cp $srcdir/tests/exampl.aux ptests/xexampl.aux

./pbibtex ptests/xexampl || rc=1
diff $srcdir/tests/exampl.bbl ptests/xexampl.bbl || rc=2


cp $srcdir/tests/enc.aux ptests/xenc.aux

guess_input_kanji_encoding=1 ./pbibtex ptests/xenc || rc=3
diff $srcdir/tests/enc-p.bbl ptests/xenc.bbl || rc=4


cp $srcdir/tests/enc-e.aux ptests/xenc-e.aux

guess_input_kanji_encoding=1 ./pbibtex -kanji=euc ptests/xenc-e || rc=5
diff $srcdir/tests/enc-ep.bbl ptests/xenc-e.bbl || rc=6


cp $srcdir/tests/enc-s.aux ptests/xenc-s.aux

./pbibtex -guess-input-enc -kanji=sjis ptests/xenc-s || rc=7
diff $srcdir/tests/enc-sp.bbl ptests/xenc-s.bbl || rc=8


cp $srcdir/tests/enc-u.aux ptests/xenc-u0.aux

./pbibtex -no-guess-input-enc ptests/xenc-u0 || rc=9
diff $srcdir/tests/enc-up.bbl ptests/xenc-u0.bbl || rc=10
./pbibtex -guess-input-enc ptests/xenc-u0 || rc=11
diff $srcdir/tests/enc-up.bbl ptests/xenc-u0.bbl || rc=12


exit $rc