#! /bin/sh -vx # $Id: pprec.test 72804 2024-11-09 10:39:22Z takuji $ # Copyright 2021-2024 TANAKA Takuji # Copyright 2017 Karl Berry # Copyright 2012 Peter Breitenlohner # You may freely use, modify and/or distribute this file. BinDir=${BinDir:-.} ExeExt=${ExeExt:-} _makeindex=$BinDir/makeindex$ExeExt TEXMFCNF=$srcdir/../kpathsea export TEXMFCNF rm -f range*.* pprec*.* romalp*.* rc=0 # test for range suffix_2p, suffix_3p, suffix_mp for num in 1 2 3; do $_makeindex -s $srcdir/tests/range$num.ist $srcdir/tests/range.idx \ -o range$num.ind1 -t range$num.ilg \ && diff $srcdir/tests/range$num.ind range$num.ind1 || rc=6 done # test for page_precedence and suffix_3p sfx=A for num in 0 1 2; do $_makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/pprec$sfx.idx \ -o pprec$sfx-$num.ind1 -t pprec$sfx-$num.ilg \ && diff $srcdir/tests/pprec$sfx-$num.ind pprec$sfx-$num.ind1 || rc=7 done sfx=B for num in 0 3 4; do $_makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/pprec$sfx.idx \ -o pprec$sfx-$num.ind1 -t pprec$sfx-$num.ilg \ && diff $srcdir/tests/pprec$sfx-$num.ind pprec$sfx-$num.ind1 || rc=8 done # test for page_precedence, heuristic detection if a letter is Roman or Alpha sfx=A for num in 5 6; do $_makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=9 done sfx=B for num in 5 6 7; do $_makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=10 done sfx=C for num in 5; do $_makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=11 done sfx=D for num in 5 6 7; do $_makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=12 done exit $rc