summaryrefslogtreecommitdiff
path: root/Build/source/texk/upmendex/tests/upmendex.test
blob: 5074c529274ebfcf9ca9ba46c2cde8bdc98b54b2 (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
#! /bin/sh -vx
# $Id$
# Copyright 2021-2024 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
# Copyright 2017-2022 Karl Berry <tex-live@tug.org>
# Copyright 2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_upmendex=$BinDir/upmendex$ExeExt

TEXMFCNF=$srcdir/../kpathsea
export TEXMFCNF

rm -f foo.* uni.* tort*.*
rc=0

$_upmendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
	&& diff $srcdir/tests/foo.ind foo.ind1 || rc=1

cat $srcdir/tests/foo.idx | $_upmendex >foo.ind2 2>foo.ilg2 \
	&& diff $srcdir/tests/foo.ind foo.ind2 || rc=2

$_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 || rc=3

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 || rc=4

$_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 || rc=5

$_upmendex $srcdir/tests/tort.idx -o tort.ind1 -t tort.ilg1 \
	&& rc=20
#$_upmendex $srcdir/tests/tort.idx -o tort.ind1 -t tort.ilg1 \
#	&& diff $srcdir/tests/ok-tort.ind tort.ind1 || :

$_upmendex $srcdir/tests/tortW.idx -o tortW.ind1 -t tortW.ilg1 \
	&& diff $srcdir/tests/ok-tort.ind tortW.ind1 || :


exit $rc