| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: bibtexu-char.test 69145 2023-12-16 06:51:56Z takuji $ |
| 3 |
# Copyright 2022-2023 TANAKA Takuji <[email protected]> |
| 4 |
# You may freely use, modify and/or distribute this file. |
| 5 |
|
| 6 |
BinDir=${BinDir:-.} |
| 7 |
ExeExt=${ExeExt:-} |
| 8 |
_bibtexu=$BinDir/bibtexu$ExeExt |
| 9 |
|
| 10 |
test -d tests || mkdir -p tests |
| 11 |
|
| 12 |
LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE |
| 13 |
# |
| 14 |
TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF |
| 15 |
BSTINPUTS=$srcdir/tests; export BSTINPUTS |
| 16 |
BIBINPUTS=$srcdir/tests; export BIBINPUTS |
| 17 |
|
| 18 |
|
| 19 |
rc=0 |
| 20 |
|
| 21 |
if [ "$(expr substr $(uname -s) 1 5)" = "MINGW" ]; then |
| 22 |
echo "*** skip test $0 on MinGW" |
| 23 |
exit 77 |
| 24 |
fi |
| 25 |
|
| 26 |
## test for add.period$ |
| 27 |
cp $srcdir/tests/periodu.aux tests/xperiodu.aux |
| 28 |
$_bibtexu tests/xperiodu || rc=3 |
| 29 |
diff $srcdir/tests/periodu.bbl tests/xperiodu.bbl || rc=4 |
| 30 |
|
| 31 |
## test for substring$ |
| 32 |
cp $srcdir/tests/substru.aux tests/xsubstru.aux |
| 33 |
$_bibtexu tests/xsubstru || rc=5 |
| 34 |
diff $srcdir/tests/substru.bbl tests/xsubstru.bbl || rc=6 |
| 35 |
|
| 36 |
## test for text.length$, text.prefix$ |
| 37 |
cp $srcdir/tests/txtprfxu.aux tests/xtxtprfxu.aux |
| 38 |
$_bibtexu tests/xtxtprfxu || rc=7 |
| 39 |
diff $srcdir/tests/txtprfxu.bbl tests/xtxtprfxu.bbl || rc=8 |
| 40 |
|
| 41 |
## test for width$ |
| 42 |
## (FIXME) Greek, Cyrillic are not impremented yet |
| 43 |
cp $srcdir/tests/widthu.aux tests/xwidthu.aux |
| 44 |
$_bibtexu tests/xwidthu || rc=9 |
| 45 |
diff $srcdir/tests/widthu.bbl tests/xwidthu.bbl || rc=10 |
| 46 |
|
| 47 |
## test for chr.to.int$, int.to.str$, int.to.chr$ |
| 48 |
cp $srcdir/tests/charu.aux tests/xcharu.aux |
| 49 |
$_bibtexu tests/xcharu || rc=11 |
| 50 |
diff $srcdir/tests/charu.bbl tests/xcharu.bbl || rc=12 |
| 51 |
|
| 52 |
## test for num.names$, format.name$ |
| 53 |
cp $srcdir/tests/nameu.aux tests/xnameu.aux |
| 54 |
max_print_line=119 $_bibtexu tests/xnameu || rc=13 |
| 55 |
diff $srcdir/tests/nameu.bbl tests/xnameu.bbl || rc=14 |
| 56 |
|
| 57 |
exit $rc |