summaryrefslogtreecommitdiff
path: root/indexing/upmendex/source/tests/upmendex.test
blob: 70ff2fac21733fe41a75848981991a805268187a (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
#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

TEXMFCNF=$srcdir/../kpathsea
export TEXMFCNF

rm -f foo.* uni.* pprec*.*

./upmendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
	&& diff $srcdir/tests/foo.ind foo.ind1 || exit 1

cat $srcdir/tests/foo.idx | ./upmendex >foo.ind2 2>foo.ilg2 \
	&& diff $srcdir/tests/foo.ind foo.ind2 || exit 1

./upmendex -d $srcdir/tests/uni.dict -s $srcdir/tests/uni.ist \
	$srcdir/tests/uni.idx -o uni.ind1 -t uni.ilg1 \
	&& diff $srcdir/tests/uni.ind uni.ind1 || exit 1

cat $srcdir/tests/uni.idx | \
	./upmendex -d $srcdir/tests/uni.dict -s $srcdir/tests/uni.ist \
	>uni.ind2 2>uni.ilg2 \
	&& diff $srcdir/tests/uni.ind uni.ind2 || exit 1

# test for page_precedence
./upmendex -s $srcdir/tests/pprec0.ist $srcdir/tests/pprecA.idx -o pprecA-0.ind1 -t pprecA-0.ilg \
	&& diff $srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 1

./upmendex -s $srcdir/tests/pprec1.ist $srcdir/tests/pprecA.idx -o pprecA-1.ind1 -t pprecA-1.ilg \
	&& diff $srcdir/tests/pprecA-1.ind pprecA-1.ind1 || exit 1

./upmendex -s $srcdir/tests/pprec2.ist $srcdir/tests/pprecA.idx -o pprecA-2.ind1 -t pprecA-2.ilg \
	&& diff $srcdir/tests/pprecA-2.ind pprecA-2.ind1 || exit 1