summaryrefslogtreecommitdiff
path: root/indexing/upmendex/source/tests/upmendex.test
blob: b64c045af95c784ba42d3d606b8b83a45f57e840 (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
#! /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*.* rangetwo.*

./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

./upmendex -d $srcdir/tests/uni.dict -s $srcdir/tests/uni1.ist -s $srcdir/tests/uni2.ist \
	$srcdir/tests/uni.idx -o uni.ind3 -t uni.ilg3 \
	&& diff $srcdir/tests/uni.ind uni.ind3 || exit 1

# test for two-element range suffix_2p
./upmendex -s $srcdir/tests/rangetwo.ist $srcdir/tests/rangetwo.idx \
	-o rangetwo.ind1 -t rangetwo.ilg \
	&& diff $srcdir/tests/rangetwo.ind rangetwo.ind1 || exit 1

# test for page_precedence and suffix_3p
./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