| 1 |
#! /bin/sh -vx |
| 2 |
# $Id$ |
| 3 |
# Copyright 2024 TANAKA Takuji <[email protected]> |
| 4 |
# Copyright 2017-2022 Karl Berry <[email protected]> |
| 5 |
# Copyright 2013 Peter Breitenlohner <[email protected]> |
| 6 |
# You may freely use, modify and/or distribute this file. |
| 7 |
|
| 8 |
BinDir=${BinDir:-.} |
| 9 |
ExeExt=${ExeExt:-} |
| 10 |
_upmendex=$BinDir/upmendex$ExeExt |
| 11 |
|
| 12 |
TEXMFCNF=$srcdir/../kpathsea |
| 13 |
export TEXMFCNF |
| 14 |
|
| 15 |
rm -f nested*.* toodeep*.* |
| 16 |
rc=0 |
| 17 |
|
| 18 |
# test for nested items and delimiters |
| 19 |
$_upmendex -s $srcdir/tests/nested3.ist -o nested3.ind1 -t nested3.ilg $srcdir/tests/nested3.idx \ |
| 20 |
&& diff $srcdir/tests/nested3.ind nested3.ind1 || rc=30 |
| 21 |
$_upmendex -s $srcdir/tests/nested.ist -o nested.ind1 -t nested.ilg $srcdir/tests/nested.idx \ |
| 22 |
&& diff $srcdir/tests/nested.ind nested.ind1 || rc=31 |
| 23 |
|
| 24 |
# check compatibility with makeindex if exist |
| 25 |
if type makeindex > /dev/null 2>&1; then |
| 26 |
makeindex -s $srcdir/tests/nested3.ist -o nested_mi.ind1 -t nested_mi.ilg $srcdir/tests/nested3.idx \ |
| 27 |
&& diff $srcdir/tests/nested3.ind nested_mi.ind1 || rc=32 |
| 28 |
fi |
| 29 |
|
| 30 |
# test for too deep indexentry |
| 31 |
$_upmendex $srcdir/tests/toodeep.idx -o toodeep.ind1 -t toodeep.ilg |
| 32 |
|
| 33 |
if [ $? -eq 255 ]; then |
| 34 |
echo "Error check: OK" |
| 35 |
else |
| 36 |
echo "Error check: NG" |
| 37 |
rc=56 |
| 38 |
fi |
| 39 |
|
| 40 |
|
| 41 |
exit $rc |