diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-11 11:46:14 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-11 11:46:14 +0000 |
commit | 1a0c302480841ccef0f9feae8e5e42f34a473aeb (patch) | |
tree | 2478a67c282a2cfe69e508df853c6399ea5618b7 /Build/source/texk/mendexk/tests | |
parent | e0f44262a980a274e38762d3ddd1d0554f938e48 (diff) |
mendex: update tests
git-svn-id: svn://tug.org/texlive/trunk@67878 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/mendexk/tests')
-rwxr-xr-x | Build/source/texk/mendexk/tests/mendex.test | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/Build/source/texk/mendexk/tests/mendex.test b/Build/source/texk/mendexk/tests/mendex.test index b1fe4eab828..690bf959221 100755 --- a/Build/source/texk/mendexk/tests/mendex.test +++ b/Build/source/texk/mendexk/tests/mendex.test @@ -4,45 +4,49 @@ # Copyright 2013 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_mendex=$BinDir/mendex$ExeExt + TEXMFCNF=$srcdir/../kpathsea export TEXMFCNF rm -f foo.* uni.* range*.* pprec*.* romalp*.* sjis.* euc.* enc*.* rc=0 -./mendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \ +$_mendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \ && diff $srcdir/tests/foo.ind foo.ind1 || rc=1 -cat $srcdir/tests/foo.idx | ./mendex >foo.ind2 2>foo.ilg2 \ +cat $srcdir/tests/foo.idx | $_mendex >foo.ind2 2>foo.ilg2 \ && diff $srcdir/tests/foo.ind foo.ind2 || rc=2 -./mendex -U -d $srcdir/tests/uni.dict -s $srcdir/tests/uni.ist \ +$_mendex -U -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 | \ - ./mendex -U -d $srcdir/tests/uni.dict -s $srcdir/tests/uni.ist \ + $_mendex -U -d $srcdir/tests/uni.dict -s $srcdir/tests/uni.ist \ >uni.ind2 2>uni.ilg2 \ && diff $srcdir/tests/uni.ind uni.ind2 || rc=4 -./mendex -U -d $srcdir/tests/uni.dict -s $srcdir/tests/uni1.ist -s $srcdir/tests/uni2.ist \ +$_mendex -U -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 cat $srcdir/tests/uni.idx | \ - guess_input_kanji_encoding=1 ./mendex -U -d $srcdir/tests/uni.dict -s $srcdir/tests/sjis.ist \ + guess_input_kanji_encoding=1 $_mendex -U -d $srcdir/tests/uni.dict -s $srcdir/tests/sjis.ist \ >sjis.ind1 2>sjis.ilg1 \ && diff $srcdir/tests/uni.ind sjis.ind1 || rc=20 cat $srcdir/tests/uni.idx | \ - ./mendex -U -d $srcdir/tests/uni.dict -s $srcdir/tests/euc.ist --guess-input-enc \ + $_mendex -U -d $srcdir/tests/uni.dict -s $srcdir/tests/euc.ist --guess-input-enc \ >euc.ind1 2>euc.ilg1 \ && diff $srcdir/tests/uni.ind euc.ind1 || rc=21 # test for range suffix_2p, suffix_3p, suffix_mp for num in 1 2 3; do -./mendex -s $srcdir/tests/range$num.ist $srcdir/tests/range.idx \ +$_mendex -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 @@ -51,13 +55,13 @@ done # test for page_precedence and suffix_3p sfx=A for num in 0 1 2; do -./mendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/pprec$sfx.idx \ +$_mendex -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 -./mendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/pprec$sfx.idx \ +$_mendex -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 @@ -66,25 +70,25 @@ done # test for page_precedence, heuristic detection if a letter is Roman or Alpha sfx=A for num in 5 6; do -./mendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \ +$_mendex -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 -./mendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \ +$_mendex -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 -./mendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \ +$_mendex -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 -./mendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \ +$_mendex -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 @@ -92,13 +96,13 @@ done # guess file encoding # input from file for enc in j e s u; do -./mendex --guess-input-enc -s $srcdir/tests/jis.ist -d $srcdir/tests/enc.dic $srcdir/tests/enc-$enc.idx \ +$_mendex --guess-input-enc -s $srcdir/tests/jis.ist -d $srcdir/tests/enc.dic $srcdir/tests/enc-$enc.idx \ -o enc-$enc.ind1 -t enc-$enc.ilg \ && diff $srcdir/tests/enc-x.ind enc-$enc.ind1 || rc=101 done for enc in j u; do -./mendex --no-guess-input-enc -s $srcdir/tests/uni.ist -d $srcdir/tests/enc.dic $srcdir/tests/enc-$enc.idx \ +$_mendex --no-guess-input-enc -s $srcdir/tests/uni.ist -d $srcdir/tests/enc.dic $srcdir/tests/enc-$enc.idx \ -o enc-$enc.ind1 -t enc-$enc.ilg \ && diff $srcdir/tests/enc-x.ind enc-$enc.ind1 || rc=102 done @@ -106,14 +110,14 @@ done # input from pipe for enc in j u; do cat $srcdir/tests/enc-$enc.idx | \ - ./mendex --guess-input-enc -i -s $srcdir/tests/euc.ist -d $srcdir/tests/enc.dic \ + $_mendex --guess-input-enc -i -s $srcdir/tests/euc.ist -d $srcdir/tests/enc.dic \ -o enc-p-$enc.ind1 -t enc-p-$enc.ilg \ && diff $srcdir/tests/enc-x.ind enc-p-$enc.ind1 || rc=103 done # imput from redirect for enc in j u; do -./mendex --guess-input-enc -i -s $srcdir/tests/sjis.ist -d $srcdir/tests/enc.dic < $srcdir/tests/enc-$enc.idx \ +$_mendex --guess-input-enc -i -s $srcdir/tests/sjis.ist -d $srcdir/tests/enc.dic < $srcdir/tests/enc-$enc.idx \ -o enc-r-$enc.ind1 -t enc-r-$enc.ilg \ && diff $srcdir/tests/enc-x.ind enc-r-$enc.ind1 || rc=104 done |