Debian Codegraph @

texk/upmendex/tests/icu.test

raw
1 #! /bin/sh -vx
2 # $Id$
3 # Copyright 2021-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 locale*.* attr*.* rule*.*
16 rc=0
17
18 # test for icu_locale
19 $_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/locale1.ist $srcdir/tests/rule.idx \
20 -o locale1.ind1 -t locale1.ilg \
21 && diff $srcdir/tests/locale1.ind locale1.ind1 || rc=51
22
23 # test for icu_attributes
24 $_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/attr1.ist $srcdir/tests/rule.idx \
25 -o attr1.ind1 -t attr1.ilg \
26 && diff $srcdir/tests/attr1.ind attr1.ind1 || rc=52
27
28 # test for icu_rules
29 $_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule1.ist $srcdir/tests/rule.idx \
30 -o rule1.ind1 -t rule1.ilg \
31 && diff $srcdir/tests/rule.ind rule1.ind1 || rc=53
32
33 $_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule2.ist $srcdir/tests/rule.idx \
34 -o rule2.ind1 -t rule2.ilg \
35 && diff $srcdir/tests/rule.ind rule2.ind1 || rc=54
36
37 # malformed input
38 $_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule3.ist $srcdir/tests/rule.idx \
39 -o rule3.ind1 -t rule3.ilg
40 if [ $? -eq 254 ]; then
41 echo "Error check: OK"
42 else
43 echo "Error check: NG"
44 exit 1
45 fi
46
47 $_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule4.ist $srcdir/tests/rule.idx \
48 -o rule4.ind1 -t rule4.ilg
49 if [ $? -eq 254 ]; then
50 echo "Error check: OK"
51 else
52 echo "Error check: NG"
53 exit 1
54 fi
55
56 # test for icu_locale + icu_rules
57 $_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/locale2.ist -s $srcdir/tests/rule1.ist $srcdir/tests/rule.idx \
58 -o locale2-rule1.ind1 -t locale2-rule1.ilg \
59 && diff $srcdir/tests/locale2-rule.ind locale2-rule1.ind1 || rc=55
60
61 $_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/locale3.ist -s $srcdir/tests/rule1.ist $srcdir/tests/rule.idx \
62 -o locale3-rule1.ind1 -t locale3-rule1.ilg \
63 && diff $srcdir/tests/locale3-rule.ind locale3-rule1.ind1 || rc=56
64
65
66 exit $rc