texlive[73835] Build/source/texk/makeindexk: makeindex: Add tests

commits+takuji at tug.org commits+takuji at tug.org
Mon Feb 10 00:41:59 CET 2025


Revision: 73835
          https://tug.org/svn/texlive?view=revision&revision=73835
Author:   takuji
Date:     2025-02-10 00:41:59 +0100 (Mon, 10 Feb 2025)
Log Message:
-----------
makeindex: Add tests

Modified Paths:
--------------
    trunk/Build/source/texk/makeindexk/ChangeLog
    trunk/Build/source/texk/makeindexk/Makefile.am
    trunk/Build/source/texk/makeindexk/Makefile.in
    trunk/Build/source/texk/makeindexk/tests/makeindex.test
    trunk/Build/source/texk/makeindexk/tests/ok-tort.ind
    trunk/Build/source/texk/makeindexk/tests/tort.idx
    trunk/Build/source/texk/makeindexk/tests/tortW.idx

Added Paths:
-----------
    trunk/Build/source/texk/makeindexk/tests/head1.ist
    trunk/Build/source/texk/makeindexk/tests/ok-tort2.ind

Modified: trunk/Build/source/texk/makeindexk/ChangeLog
===================================================================
--- trunk/Build/source/texk/makeindexk/ChangeLog	2025-02-09 23:41:51 UTC (rev 73834)
+++ trunk/Build/source/texk/makeindexk/ChangeLog	2025-02-09 23:41:59 UTC (rev 73835)
@@ -1,3 +1,10 @@
+2025-02-10  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* tests/makeindex.test, tests/head1.ist,
+	tests/tort{,W}.idx, tests/ok-tort{,2}.ind:
+	Add tests for encap escape & heading_{pre,post}fix.
+	* Makefile.am: Adjust.
+
 2024-11-09  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* tests/{makeindex,pprec}.test: Split test scripts.

Modified: trunk/Build/source/texk/makeindexk/Makefile.am
===================================================================
--- trunk/Build/source/texk/makeindexk/Makefile.am	2025-02-09 23:41:51 UTC (rev 73834)
+++ trunk/Build/source/texk/makeindexk/Makefile.am	2025-02-09 23:41:59 UTC (rev 73835)
@@ -51,7 +51,8 @@
 DISTCLEANFILES = nested-range.ilg nested-range.ind
 ## tests/makeindex.test
 EXTRA_DIST += tests/sample.idx tests/sample.ind \
-	tests/tort.idx tests/tortW.idx tests/ok-tort.ind
+	tests/tort.idx tests/tortW.idx tests/head1.ist \
+	tests/ok-tort.ind tests/ok-tort2.ind
 DISTCLEANFILES += sample.* tort*.*
 ## tests/pprec.test
 EXTRA_DIST += tests/range.idx \

Modified: trunk/Build/source/texk/makeindexk/Makefile.in
===================================================================
--- trunk/Build/source/texk/makeindexk/Makefile.in	2025-02-09 23:41:51 UTC (rev 73834)
+++ trunk/Build/source/texk/makeindexk/Makefile.in	2025-02-09 23:41:59 UTC (rev 73835)
@@ -592,20 +592,21 @@
 EXTRA_DIST = CONTRIB NOTES ind-src $(TESTS) tests/nested-range.tex \
 	tests/nested-range.idx tests/nested-range-bb.tex \
 	tests/nested-range-bb.idx tests/sample.idx tests/sample.ind \
-	tests/tort.idx tests/tortW.idx tests/ok-tort.ind \
-	tests/range.idx tests/range1.ist tests/range2.ist \
-	tests/range3.ist tests/range1.ind tests/range2.ind \
-	tests/range3.ind tests/pprec0.ist tests/pprec1.ist \
-	tests/pprec2.ist tests/pprec3.ist tests/pprec4.ist \
-	tests/pprec5.ist tests/pprec6.ist tests/pprec7.ist \
-	tests/pprecA.idx tests/pprecA-0.ind tests/pprecA-1.ind \
-	tests/pprecA-2.ind tests/pprecB.idx tests/pprecB-0.ind \
-	tests/pprecB-3.ind tests/pprecB-4.ind tests/romalpA.idx \
-	tests/romalpA-5.ind tests/romalpA-6.ind tests/romalpB.idx \
-	tests/romalpB-5.ind tests/romalpB-6.ind tests/romalpB-7.ind \
-	tests/romalpC.idx tests/romalpC-5.ind tests/romalpD.idx \
-	tests/romalpD-5.ind tests/romalpD-6.ind tests/romalpD-7.ind \
-	tests/nested3.ist tests/nested3.ind tests/toodeep.idx
+	tests/tort.idx tests/tortW.idx tests/head1.ist \
+	tests/ok-tort.ind tests/ok-tort2.ind tests/range.idx \
+	tests/range1.ist tests/range2.ist tests/range3.ist \
+	tests/range1.ind tests/range2.ind tests/range3.ind \
+	tests/pprec0.ist tests/pprec1.ist tests/pprec2.ist \
+	tests/pprec3.ist tests/pprec4.ist tests/pprec5.ist \
+	tests/pprec6.ist tests/pprec7.ist tests/pprecA.idx \
+	tests/pprecA-0.ind tests/pprecA-1.ind tests/pprecA-2.ind \
+	tests/pprecB.idx tests/pprecB-0.ind tests/pprecB-3.ind \
+	tests/pprecB-4.ind tests/romalpA.idx tests/romalpA-5.ind \
+	tests/romalpA-6.ind tests/romalpB.idx tests/romalpB-5.ind \
+	tests/romalpB-6.ind tests/romalpB-7.ind tests/romalpC.idx \
+	tests/romalpC-5.ind tests/romalpD.idx tests/romalpD-5.ind \
+	tests/romalpD-6.ind tests/romalpD-7.ind tests/nested3.ist \
+	tests/nested3.ind tests/toodeep.idx
 TEST_EXTENSIONS = .pl .test
 TESTS = tests/nested-range-test.pl tests/makeindex.test \
 	tests/pprec.test \

Added: trunk/Build/source/texk/makeindexk/tests/head1.ist
===================================================================
--- trunk/Build/source/texk/makeindexk/tests/head1.ist	                        (rev 0)
+++ trunk/Build/source/texk/makeindexk/tests/head1.ist	2025-02-09 23:41:59 UTC (rev 73835)
@@ -0,0 +1,3 @@
+headings_flag 1
+heading_prefix "aaa\tbbb\|ccc\\ddd\n\[\{\(\"\'"
+heading_suffix "\'\"\)\}\]\naaa\tbbb\|ccc\\ddd"

Modified: trunk/Build/source/texk/makeindexk/tests/makeindex.test
===================================================================
--- trunk/Build/source/texk/makeindexk/tests/makeindex.test	2025-02-09 23:41:51 UTC (rev 73834)
+++ trunk/Build/source/texk/makeindexk/tests/makeindex.test	2025-02-09 23:41:59 UTC (rev 73835)
@@ -1,6 +1,6 @@
 #! /bin/sh -vx
 # $Id$
-# Copyright 2024 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+# Copyright 2024-2025 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
 # Copyright 2017 Karl Berry <tex-live at tug.org>
 # Copyright 2012 Peter Breitenlohner <tex-live at tug.org>
 # You may freely use, modify and/or distribute this file.
@@ -27,5 +27,11 @@
 $_makeindex $srcdir/tests/tortW.idx -o tortW.ind1 -t tortW.ilg1 \
 	&& diff $srcdir/tests/ok-tort.ind tortW.ind1 || rc=21
 
+$_makeindex $srcdir/tests/tort.idx -s $srcdir/tests/head1.ist -o tort2.ind1 -t tort2.ilg1 \
+	&& diff $srcdir/tests/ok-tort2.ind tort2.ind1 || rc=22
 
+$_makeindex $srcdir/tests/tortW.idx -s $srcdir/tests/head1.ist -o tortW2.ind1 -t tortW2.ilg1 \
+	&& diff $srcdir/tests/ok-tort2.ind tortW2.ind1 || rc=23
+
+
 exit $rc

Modified: trunk/Build/source/texk/makeindexk/tests/ok-tort.ind
===================================================================
--- trunk/Build/source/texk/makeindexk/tests/ok-tort.ind	2025-02-09 23:41:51 UTC (rev 73834)
+++ trunk/Build/source/texk/makeindexk/tests/ok-tort.ind	2025-02-09 23:41:59 UTC (rev 73835)
@@ -4,6 +4,11 @@
 
   \indexspace
 
+  \item encap-escape1 aaa at bbb|ccc!ddd"eee{fff}, \ppp{11}, 10--12
+  \item encap-escape2, \aaa at bbb|ccc!ddd"eee{fff}{20--22}
+
+  \indexspace
+
   \item implicit-range, 10--12
   \item incons-encaps, \ii{6}, 5--7
   \item incons-encaps2, \ii{5}, 5

Copied: trunk/Build/source/texk/makeindexk/tests/ok-tort2.ind (from rev 73834, trunk/Build/source/texk/makeindexk/tests/ok-tort.ind)
===================================================================
--- trunk/Build/source/texk/makeindexk/tests/ok-tort2.ind	                        (rev 0)
+++ trunk/Build/source/texk/makeindexk/tests/ok-tort2.ind	2025-02-09 23:41:59 UTC (rev 73835)
@@ -0,0 +1,39 @@
+\begin{theindex}
+aaa	bbb|ccc\ddd
+[{("'B'")}]
+aaa	bbb|ccc\ddd
+  \item bad-encaps, \ii{5--7}
+
+  \indexspace
+aaa	bbb|ccc\ddd
+[{("'E'")}]
+aaa	bbb|ccc\ddd
+  \item encap-escape1 aaa at bbb|ccc!ddd"eee{fff}, \ppp{11}, 10--12
+  \item encap-escape2, \aaa at bbb|ccc!ddd"eee{fff}{20--22}
+
+  \indexspace
+aaa	bbb|ccc\ddd
+[{("'I'")}]
+aaa	bbb|ccc\ddd
+  \item implicit-range, 10--12
+  \item incons-encaps, \ii{6}, 5--7
+  \item incons-encaps2, \ii{5}, 5
+  \item incons-entries, 6, \xx{6}
+
+  \indexspace
+aaa	bbb|ccc\ddd
+[{("'M'")}]
+aaa	bbb|ccc\ddd
+  \item missing(, 6
+  \item missing), 6
+  \item mixed-range, i, 6
+  \item mixed-range1, i--iv, 3--6
+  \item mixed-range2, \xx{ii}, i--ii, \yy{3--6}
+
+  \indexspace
+aaa	bbb|ccc\ddd
+[{("'O'")}]
+aaa	bbb|ccc\ddd
+  \item ok-encaps, \ii{5--7}
+
+\end{theindex}

Modified: trunk/Build/source/texk/makeindexk/tests/tort.idx
===================================================================
--- trunk/Build/source/texk/makeindexk/tests/tort.idx	2025-02-09 23:41:51 UTC (rev 73834)
+++ trunk/Build/source/texk/makeindexk/tests/tort.idx	2025-02-09 23:41:59 UTC (rev 73835)
@@ -42,3 +42,11 @@
 \indexentry{mixed-range2|xx}{ii}
 \indexentry{mixed-range2|yy}{3}
 \indexentry{mixed-range2|)}{6}
+
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|(}{10}
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|ppp}{11}
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|)}{12}
+
+\indexentry{encap-escape2|(aaa"@bbb"|ccc"!ddd""eee"{fff"}}{20}
+\indexentry{encap-escape2|aaa"@bbb"|ccc"!ddd""eee"{fff"}}{21}
+\indexentry{encap-escape2|)}{22}

Modified: trunk/Build/source/texk/makeindexk/tests/tortW.idx
===================================================================
--- trunk/Build/source/texk/makeindexk/tests/tortW.idx	2025-02-09 23:41:51 UTC (rev 73834)
+++ trunk/Build/source/texk/makeindexk/tests/tortW.idx	2025-02-09 23:41:59 UTC (rev 73835)
@@ -42,3 +42,11 @@
 \indexentry{mixed-range2|xx}{ii}
 \indexentry{mixed-range2|yy}{3}
 \indexentry{mixed-range2|)}{6}
+
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|(}{10}
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|ppp}{11}
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|)}{12}
+
+\indexentry{encap-escape2|(aaa"@bbb"|ccc"!ddd""eee"{fff"}}{20}
+\indexentry{encap-escape2|aaa"@bbb"|ccc"!ddd""eee"{fff"}}{21}
+\indexentry{encap-escape2|)}{22}



More information about the tex-live-commits mailing list.