summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/uptexdir/upbibtex.test
blob: 7b880ef97c6d073bfa87f05f6479ab410d474655 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2011-2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_upbibtex=$BinDir/upbibtex$ExeExt

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

rc=0

$_upbibtex -version || rc=100

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

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

$_upbibtex uptests/xexampl || rc=1
diff $srcdir/tests/exampl.bbl uptests/xexampl.bbl || rc=2


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

guess_input_kanji_encoding=1 $_upbibtex uptests/xenc || rc=3
diff $srcdir/tests/enc-u.bbl uptests/xenc.bbl || rc=4


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

guess_input_kanji_encoding=1 $_upbibtex -kanji=euc uptests/xenc-e || rc=5
diff $srcdir/tests/enc-eu.bbl uptests/xenc-e.bbl || rc=6


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

$_upbibtex -guess-input-enc -kanji=sjis uptests/xenc-s || rc=7
diff $srcdir/tests/enc-su.bbl uptests/xenc-s.bbl || rc=8


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

$_upbibtex -no-guess-input-enc uptests/xenc-u0 || rc=9
diff $srcdir/tests/enc-uu.bbl uptests/xenc-u0.bbl || rc=10
$_upbibtex -guess-input-enc uptests/xenc-u0 || rc=11
diff $srcdir/tests/enc-uu.bbl uptests/xenc-u0.bbl || rc=12


## -kanji-internal=euc, compatible with pbibtex
cp $srcdir/tests/enc.aux uptests/xenc-u-e.aux

guess_input_kanji_encoding=1 $_upbibtex -kanji-internal=euc uptests/xenc-u-e || rc=53
diff $srcdir/tests/enc-p.bbl uptests/xenc-u-e.bbl || rc=54


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

guess_input_kanji_encoding=1 $_upbibtex -kanji=euc -kanji-internal=euc uptests/xenc-e-e || rc=55
diff $srcdir/tests/enc-ep.bbl uptests/xenc-e-e.bbl || rc=56


cp $srcdir/tests/enc-s.aux uptests/xenc-s-e.aux

$_upbibtex -guess-input-enc -kanji=sjis -kanji-internal=euc uptests/xenc-s-e || rc=57
diff $srcdir/tests/enc-sp.bbl uptests/xenc-s-e.bbl || rc=58


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

$_upbibtex -no-guess-input-enc -kanji-internal=euc uptests/xenc-u0-e || rc=59
diff $srcdir/tests/enc-up.bbl uptests/xenc-u0-e.bbl || rc=60
$_upbibtex -guess-input-enc -kanji-internal=euc uptests/xenc-u0-e || rc=61
diff $srcdir/tests/enc-up.bbl uptests/xenc-u0-e.bbl || rc=62


exit $rc