summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-08-23 14:13:31 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-08-23 14:13:31 +0000
commit6545ce7952bf97897dbc070c25400dd28c6074d3 (patch)
tree7baf50efb3542d66462ccfe7ac3cea191344ff22 /Build
parent20c781e26d8ae66be6df99089034652b28e76a6f (diff)
upmendex: Add tests for icu_rules
git-svn-id: svn://tug.org/texlive/trunk@60308 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/upmendex/ChangeLog5
-rw-r--r--Build/source/texk/upmendex/tests/rule.idx13
-rw-r--r--Build/source/texk/upmendex/tests/rule.ind29
-rw-r--r--Build/source/texk/upmendex/tests/rule1.ist3
-rw-r--r--Build/source/texk/upmendex/tests/rule2.ist3
-rwxr-xr-xBuild/source/texk/upmendex/tests/upmendex.test11
6 files changed, 63 insertions, 1 deletions
diff --git a/Build/source/texk/upmendex/ChangeLog b/Build/source/texk/upmendex/ChangeLog
index 497e0e6e268..a613c67f878 100644
--- a/Build/source/texk/upmendex/ChangeLog
+++ b/Build/source/texk/upmendex/ChangeLog
@@ -1,3 +1,8 @@
+2021-08-23 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * tests/upmendex.test, tests/rule[12].ist, tests/rule.{idx,ind}:
+ Add new tests for the keyword "icu_rules" in style file.
+
2021-08-08 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* version 0.58 Beta version.
diff --git a/Build/source/texk/upmendex/tests/rule.idx b/Build/source/texk/upmendex/tests/rule.idx
new file mode 100644
index 00000000000..ce6ad5d52c8
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/rule.idx
@@ -0,0 +1,13 @@
+% -*- coding: utf-8 -*-
+\indexentry{A}{400}
+\indexentry{a}{401}
+\indexentry{B}{402}
+\indexentry{b}{403}
+\indexentry{C}{404}
+\indexentry{c}{405}
+\indexentry{Ç}{406}
+\indexentry{ç}{407}
+\indexentry{U}{408}
+\indexentry{u}{409}
+\indexentry{Ü}{410}
+\indexentry{ü}{411}
diff --git a/Build/source/texk/upmendex/tests/rule.ind b/Build/source/texk/upmendex/tests/rule.ind
new file mode 100644
index 00000000000..bb5e6c5e256
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/rule.ind
@@ -0,0 +1,29 @@
+\begin{theindex}
+
+\centerline{\bfseries ◆◆◆ A ◆◆◆}\par\nobreak
+ \item a\leaders\hbox{$\cdot$}\hfill 401
+ \item A\leaders\hbox{$\cdot$}\hfill 400
+
+ \indexspace
+
+\centerline{\bfseries ◆◆◆ C ◆◆◆}\par\nobreak
+ \item C\leaders\hbox{$\cdot$}\hfill 404
+ \item Ç\leaders\hbox{$\cdot$}\hfill 406
+ \item c\leaders\hbox{$\cdot$}\hfill 405
+ \item ç\leaders\hbox{$\cdot$}\hfill 407
+
+ \indexspace
+
+\centerline{\bfseries ◆◆◆ U ◆◆◆}\par\nobreak
+ \item u\leaders\hbox{$\cdot$}\hfill 409
+ \item U\leaders\hbox{$\cdot$}\hfill 408
+ \item ü\leaders\hbox{$\cdot$}\hfill 411
+ \item Ü\leaders\hbox{$\cdot$}\hfill 410
+
+ \indexspace
+
+\centerline{\bfseries ◆◆◆ B ◆◆◆}\par\nobreak
+ \item b\leaders\hbox{$\cdot$}\hfill 403
+ \item B\leaders\hbox{$\cdot$}\hfill 402
+
+\end{theindex}
diff --git a/Build/source/texk/upmendex/tests/rule1.ist b/Build/source/texk/upmendex/tests/rule1.ist
new file mode 100644
index 00000000000..c986e39e969
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/rule1.ist
@@ -0,0 +1,3 @@
+% -*- coding: utf-8 -*-
+
+icu_rules "&a<<<A<C<<Ç<<c<<ç<u<<U<<ü<<Ü<b<<B"
diff --git a/Build/source/texk/upmendex/tests/rule2.ist b/Build/source/texk/upmendex/tests/rule2.ist
new file mode 100644
index 00000000000..a61af0a5462
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/rule2.ist
@@ -0,0 +1,3 @@
+% -*- coding: utf-8 -*-
+
+icu_rules "&a<<<A<C<<\U000000c7<<c<<\u00E7<u<<U<<\x{fc}<<\xDC<b<<B"
diff --git a/Build/source/texk/upmendex/tests/upmendex.test b/Build/source/texk/upmendex/tests/upmendex.test
index b64c045af95..e9263997824 100755
--- a/Build/source/texk/upmendex/tests/upmendex.test
+++ b/Build/source/texk/upmendex/tests/upmendex.test
@@ -7,7 +7,7 @@
TEXMFCNF=$srcdir/../kpathsea
export TEXMFCNF
-rm -f foo.* uni.* pprec*.* rangetwo.*
+rm -f foo.* uni.* pprec*.* rangetwo.* rule*.*
./upmendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
&& diff $srcdir/tests/foo.ind foo.ind1 || exit 1
@@ -46,3 +46,12 @@ cat $srcdir/tests/uni.idx | \
-o pprecA-2.ind1 -t pprecA-2.ilg \
&& diff $srcdir/tests/pprecA-2.ind pprecA-2.ind1 || exit 1
+# test for icu_rules
+./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule1.ist $srcdir/tests/rule.idx \
+ -o rule1.ind1 -t rule1.ilg \
+ && diff $srcdir/tests/rule.ind rule1.ind1 || exit 1
+
+./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule2.ist $srcdir/tests/rule.idx \
+ -o rule2.ind1 -t rule2.ilg \
+ && diff $srcdir/tests/rule.ind rule2.ind1 || exit 1
+