texlive[72805] Build/source/texk/mendexk: mendex: Version 3.7

commits+takuji at tug.org commits+takuji at tug.org
Sat Nov 9 11:39:27 CET 2024


Revision: 72805
          https://tug.org/svn/texlive?view=revision&revision=72805
Author:   takuji
Date:     2024-11-09 11:39:26 +0100 (Sat, 09 Nov 2024)
Log Message:
-----------
mendex: Version 3.7 [09-Nov-2024]

Modified Paths:
--------------
    trunk/Build/source/texk/mendexk/ChangeLog
    trunk/Build/source/texk/mendexk/Makefile.am
    trunk/Build/source/texk/mendexk/Makefile.in
    trunk/Build/source/texk/mendexk/configure
    trunk/Build/source/texk/mendexk/configure.ac
    trunk/Build/source/texk/mendexk/fread.c
    trunk/Build/source/texk/mendexk/fwrite.c
    trunk/Build/source/texk/mendexk/tests/mendex.test
    trunk/Build/source/texk/mendexk/version.h

Added Paths:
-----------
    trunk/Build/source/texk/mendexk/tests/encode.test
    trunk/Build/source/texk/mendexk/tests/nest.test
    trunk/Build/source/texk/mendexk/tests/nested3.idx
    trunk/Build/source/texk/mendexk/tests/nested3.ind
    trunk/Build/source/texk/mendexk/tests/nested3.ist
    trunk/Build/source/texk/mendexk/tests/ok-tort.ind
    trunk/Build/source/texk/mendexk/tests/pprec.test
    trunk/Build/source/texk/mendexk/tests/toodeep.idx
    trunk/Build/source/texk/mendexk/tests/tort.idx
    trunk/Build/source/texk/mendexk/tests/tortW.idx

Modified: trunk/Build/source/texk/mendexk/ChangeLog
===================================================================
--- trunk/Build/source/texk/mendexk/ChangeLog	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/ChangeLog	2024-11-09 10:39:26 UTC (rev 72805)
@@ -1,3 +1,19 @@
+2024-11-09  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* configure.ac, version.h:
+	Version 3.7 [09-Nov-2024].
+	* fwrite.c: Better treatment of "item_12"
+	for compatibility with makeindex.
+	https://github.com/t-tk/upmendex-package/pull/9
+	* fread.c: Improve error message when reading index entries.
+	https://github.com/t-tk/upmendex-package/issues/13
+	* tests/{mendex,pprec,encode}.test: Split test scripts.
+	* tests/nest.test, tests/nested3.{ist,idx,ind},
+	tests/toodeep.idx: Add new tests for nested depth.
+	* tests/mendex.test, tests/tort{,W}.idx, tests/ok-tort.ind:
+	Add new tests for error/warning.
+	* Makefile.am: Adjust.
+
 2024-03-10  Karl Berry  <karl at tug.org>
 
 	* TL'24 release.

Modified: trunk/Build/source/texk/mendexk/Makefile.am
===================================================================
--- trunk/Build/source/texk/mendexk/Makefile.am	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/Makefile.am	2024-11-09 10:39:26 UTC (rev 72805)
@@ -51,7 +51,10 @@
 
 ## Tests
 ##
-TESTS = tests/mendex.test
+TESTS = tests/mendex.test \
+	tests/pprec.test \
+	tests/nest.test \
+	tests/encode.test
 tests/mendex.log: mendex$(EXEEXT)
 EXTRA_DIST += $(TESTS)
 
@@ -59,8 +62,11 @@
 EXTRA_DIST += tests/foo.idx tests/foo.ind \
 	tests/uni.idx tests/uni.dict tests/uni.ist \
 	tests/uni1.ist tests/uni2.ist tests/uni.ind \
-	tests/sjis.ist tests/euc.ist tests/jis.ist \
-	tests/range.idx tests/range2.ist tests/range2.ist tests/range3.ist \
+	tests/tort.idx tests/tortW.idx tests/ok-tort.ind
+DISTCLEANFILES = foo.* uni.* tort*.*
+## tests/pprec.test
+EXTRA_DIST += 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 \
@@ -69,8 +75,15 @@
 	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/romalpD.idx tests/romalpD-5.ind tests/romalpD-6.ind tests/romalpD-7.ind
+DISTCLEANFILES += range*.* pprec*.* romalp*.*
+## tests/nest.test
+EXTRA_DIST += tests/nested3.ist tests/nested3.ind \
+	tests/toodeep.idx
+DISTCLEANFILES += nested*.* toodeep*.*
+## tests/encode.test
+EXTRA_DIST += tests/sjis.ist tests/euc.ist tests/jis.ist \
 	tests/enc-e.idx tests/enc-j.idx tests/enc-s.idx tests/enc-u.idx \
 	tests/enc-x.ind tests/enc.dic
-DISTCLEANFILES = foo.* uni.* range*.* pprec*.* romalp*.* enc*.*
+DISTCLEANFILES += sjis.* euc.* enc*.*
 

Modified: trunk/Build/source/texk/mendexk/Makefile.in
===================================================================
--- trunk/Build/source/texk/mendexk/Makefile.in	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/Makefile.in	2024-11-09 10:39:26 UTC (rev 72805)
@@ -595,23 +595,30 @@
 EXTRA_DIST = COPYRIGHT COPYRIGHT.ja ChangeLog.ja indexsty \
 	mendex.ja.txt mendex.1 mendex.1.ja $(TESTS) tests/foo.idx \
 	tests/foo.ind tests/uni.idx tests/uni.dict tests/uni.ist \
-	tests/uni1.ist tests/uni2.ist tests/uni.ind tests/sjis.ist \
-	tests/euc.ist tests/jis.ist tests/range.idx tests/range2.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/enc-e.idx tests/enc-j.idx \
+	tests/uni1.ist tests/uni2.ist tests/uni.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/sjis.ist \
+	tests/euc.ist tests/jis.ist tests/enc-e.idx tests/enc-j.idx \
 	tests/enc-s.idx tests/enc-u.idx tests/enc-x.ind tests/enc.dic
-TESTS = tests/mendex.test
-DISTCLEANFILES = foo.* uni.* range*.* pprec*.* romalp*.* enc*.*
+TESTS = tests/mendex.test \
+	tests/pprec.test \
+	tests/nest.test \
+	tests/encode.test
+
+DISTCLEANFILES = foo.* uni.* tort*.* range*.* pprec*.* romalp*.* \
+	nested*.* toodeep*.* sjis.* euc.* enc*.*
 all: c-auto.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 

Modified: trunk/Build/source/texk/mendexk/configure
===================================================================
--- trunk/Build/source/texk/mendexk/configure	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/configure	2024-11-09 10:39:26 UTC (rev 72805)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for mendex (TeX Live) 3.6.
+# Generated by GNU Autoconf 2.72 for mendex (TeX Live) 3.7.
 #
 #
 # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
@@ -611,8 +611,8 @@
 # Identity of this package.
 PACKAGE_NAME='mendex (TeX Live)'
 PACKAGE_TARNAME='mendex--tex-live-'
-PACKAGE_VERSION='3.6'
-PACKAGE_STRING='mendex (TeX Live) 3.6'
+PACKAGE_VERSION='3.7'
+PACKAGE_STRING='mendex (TeX Live) 3.7'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1364,7 +1364,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures mendex (TeX Live) 3.6 to adapt to many kinds of systems.
+'configure' configures mendex (TeX Live) 3.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1436,7 +1436,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mendex (TeX Live) 3.6:";;
+     short | recursive ) echo "Configuration of mendex (TeX Live) 3.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1558,7 +1558,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mendex (TeX Live) configure 3.6
+mendex (TeX Live) configure 3.7
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2100,7 +2100,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mendex (TeX Live) $as_me 3.6, which was
+It was created by mendex (TeX Live) $as_me 3.7, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -8994,7 +8994,7 @@
 
 # Define the identity of the package.
  PACKAGE='mendex--tex-live-'
- VERSION='3.6'
+ VERSION='3.7'
 
 
 # Some tools Automake needs.
@@ -15352,7 +15352,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-mendex (TeX Live) config.lt 3.6
+mendex (TeX Live) config.lt 3.7
 configured by $0, generated by GNU Autoconf 2.72.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -17005,7 +17005,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mendex (TeX Live) $as_me 3.6, which was
+This file was extended by mendex (TeX Live) $as_me 3.7, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17073,7 +17073,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-mendex (TeX Live) config.status 3.6
+mendex (TeX Live) config.status 3.7
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/texk/mendexk/configure.ac
===================================================================
--- trunk/Build/source/texk/mendexk/configure.ac	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/configure.ac	2024-11-09 10:39:26 UTC (rev 72805)
@@ -8,7 +8,7 @@
 dnl   gives unlimited permission to copy and/or distribute it,
 dnl   with or without modifications, as long as this notice is preserved.
 dnl
-AC_INIT([mendex (TeX Live)], [3.6])
+AC_INIT([mendex (TeX Live)], [3.7])
 AC_PREREQ([2.71])
 AC_CONFIG_SRCDIR([main.c])
 AC_CONFIG_AUX_DIR([../../build-aux])

Modified: trunk/Build/source/texk/mendexk/fread.c
===================================================================
--- trunk/Build/source/texk/mendexk/fread.c	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/fread.c	2024-11-09 10:39:26 UTC (rev 72805)
@@ -150,9 +150,9 @@
 						if (buff[j]==encap) {
 							j++;
 							cc=getestr(&buff[j],estr);
-							if (cc<0) {
-								fprintf(efp,"\nBad encap string in %s, line %d.",filename,ind[i].lnum);
-								if (efp!=stderr) fprintf(stderr,"\nBad encap string in %s, line %d.",filename,ind[i].lnum);
+							if (cc<0 || strchr(estr,encap)) {
+								fprintf(efp,"\nError: Bad encap string in %s, line %d.",filename,ind[i].lnum);
+								if (efp!=stderr) fprintf(stderr,"\nError: Bad encap string in %s, line %d.",filename,ind[i].lnum);
 								eflg++;
 								reject++;
 								n++;
@@ -208,6 +208,17 @@
 			if (buff[j]!=escape) esc=0;
 			copy_multibyte_char(buff, wbuff, &j, &k);
 		}
+		for (k=0; k<=indent; k++) {
+			if ((strlen(ind[i].idx[k])==0 && ind[i].org[k]==NULL) ||
+				 (ind[i].org[k] && strlen(ind[i].org[k])==0)) {
+				fprintf(efp,"\nError: Illegal null field in %s, line %d.",filename,ind[i].lnum);
+				if (efp!=stderr) fprintf(stderr,"\nError: Illegal null field in %s, line %d.",filename,ind[i].lnum);
+				eflg++;
+				reject++;
+				n++;
+				goto LOOP;
+			}
+		}
 		ind[i].words=indent+1;
 
 /*   kana-convert   */

Modified: trunk/Build/source/texk/mendexk/fwrite.c
===================================================================
--- trunk/Build/source/texk/mendexk/fwrite.c	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/fwrite.c	2024-11-09 10:39:26 UTC (rev 72805)
@@ -333,7 +333,8 @@
 					else                   SAPPENDF(lbuff,"%s",item_x2);
 				}
 				else {
-					SAPPENDF(lbuff,"%s",item_2);
+					if (ind[i-1].words==2) SAPPENDF(lbuff,"%s",item_12);
+					else                   SAPPENDF(lbuff,"%s",item_2);
 				}
 				SAPPENDF(lbuff,"%s",ind[i].idx[2]);
 				SAPPENDF(lbuff,"%s",delim_2);

Added: trunk/Build/source/texk/mendexk/tests/encode.test
===================================================================
--- trunk/Build/source/texk/mendexk/tests/encode.test	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/encode.test	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,58 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2022-2024 Japanese TeX Development Community <issue at texjp.org>
+# Copyright 2017-2022 Karl Berry <tex-live at tug.org>
+# Copyright 2013 Peter Breitenlohner <tex-live at 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 sjis.* euc.* enc*.*
+rc=0
+
+# guess file encoding
+cat $srcdir/tests/uni.idx | \
+	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 \
+	>euc.ind1 2>euc.ilg1 \
+	&& diff $srcdir/tests/uni.ind euc.ind1 || rc=21
+
+# 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 \
+	-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 \
+	-o enc-$enc.ind1 -t enc-$enc.ilg \
+	&& diff $srcdir/tests/enc-x.ind enc-$enc.ind1 || rc=102
+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 \
+	-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 \
+	-o enc-r-$enc.ind1 -t enc-r-$enc.ilg \
+	&& diff $srcdir/tests/enc-x.ind enc-r-$enc.ind1 || rc=104
+done
+
+
+exit $rc


Property changes on: trunk/Build/source/texk/mendexk/tests/encode.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Build/source/texk/mendexk/tests/mendex.test
===================================================================
--- trunk/Build/source/texk/mendexk/tests/mendex.test	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/tests/mendex.test	2024-11-09 10:39:26 UTC (rev 72805)
@@ -1,5 +1,6 @@
 #! /bin/sh -vx
 # $Id$
+# Copyright 2014-2024 Japanese TeX Development Community <issue at texjp.org>
 # Copyright 2017-2022 Karl Berry <tex-live at tug.org>
 # Copyright 2013 Peter Breitenlohner <tex-live at tug.org>
 # You may freely use, modify and/or distribute this file.
@@ -11,7 +12,7 @@
 TEXMFCNF=$srcdir/../kpathsea
 export TEXMFCNF
 
-rm -f foo.* uni.* range*.* pprec*.* romalp*.* sjis.* euc.* enc*.*
+rm -f foo.* uni.* tort*.*
 rc=0
 
 $_mendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
@@ -33,94 +34,13 @@
 	$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 \
-	>sjis.ind1 2>sjis.ilg1 \
-	&& diff $srcdir/tests/uni.ind sjis.ind1 || rc=20
+$_mendex $srcdir/tests/tort.idx -o tort.ind1 -t tort.ilg1 \
+	&& rc=20
+#$_mendex $srcdir/tests/tort.idx -o tort.ind1 -t tort.ilg1 \
+#	&& diff $srcdir/tests/ok-tort.ind tort.ind1 || :
 
-cat $srcdir/tests/uni.idx | \
-	$_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
+$_mendex $srcdir/tests/tortW.idx -o tortW.ind1 -t tortW.ilg1 \
+	&& diff $srcdir/tests/ok-tort.ind tortW.ind1 || :
 
 
-# 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 \
-	-o range$num.ind1 -t range$num.ilg \
-	&& diff $srcdir/tests/range$num.ind range$num.ind1 || rc=6
-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 \
-	-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 \
-	-o pprec$sfx-$num.ind1 -t pprec$sfx-$num.ilg \
-	&& diff $srcdir/tests/pprec$sfx-$num.ind pprec$sfx-$num.ind1 || rc=8
-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 \
-	-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 \
-	-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 \
-	-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 \
-	-o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
-	&& diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=12
-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 \
-	-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 \
-	-o enc-$enc.ind1 -t enc-$enc.ilg \
-	&& diff $srcdir/tests/enc-x.ind enc-$enc.ind1 || rc=102
-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 \
-	-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 \
-	-o enc-r-$enc.ind1 -t enc-r-$enc.ilg \
-	&& diff $srcdir/tests/enc-x.ind enc-r-$enc.ind1 || rc=104
-done
-
-
 exit $rc

Added: trunk/Build/source/texk/mendexk/tests/nest.test
===================================================================
--- trunk/Build/source/texk/mendexk/tests/nest.test	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/nest.test	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,33 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2024 Japanese TeX Development Community <issue at texjp.org>
+# Copyright 2017-2022 Karl Berry <tex-live at tug.org>
+# Copyright 2013 Peter Breitenlohner <tex-live at 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 nested*.* toodeep*.*
+rc=0
+
+# test for nested items and delimiters
+$_mendex -s $srcdir/tests/nested3.ist -o nested3.ind1 -t nested3.ilg $srcdir/tests/nested3.idx \
+	&& diff $srcdir/tests/nested3.ind nested3.ind1 || rc=30
+
+# test for too deep indexentry
+$_mendex $srcdir/tests/toodeep.idx -o toodeep.ind1 -t toodeep.ilg
+
+if [ $? -eq 255 ]; then
+  echo "Error check: OK"
+else
+  echo "Error check: NG"
+  rc=56
+fi
+
+
+exit $rc


Property changes on: trunk/Build/source/texk/mendexk/tests/nest.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/mendexk/tests/nested3.idx
===================================================================
--- trunk/Build/source/texk/mendexk/tests/nested3.idx	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/nested3.idx	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,19 @@
+\indexentry{xa}{1}
+\indexentry{xb}{1}
+\indexentry{xc}{1}
+\indexentry{ya!x}{1}
+\indexentry{ya!y}{1}
+\indexentry{ya!z}{1}
+\indexentry{yb!x!x}{1}
+\indexentry{yb!x!y}{1}
+\indexentry{yb!x!z}{1}
+\indexentry{a}{1}
+\indexentry{a!a}{2}
+\indexentry{a!a!a}{3}
+\indexentry{ab}{6}
+\indexentry{ad!a}{8}
+\indexentry{ad!b}{9}
+\indexentry{ae!a!a}{11}
+\indexentry{ae!b!b}{12}
+\indexentry{pa}{21}
+\indexentry{pa!qa!ra}{22}

Added: trunk/Build/source/texk/mendexk/tests/nested3.ind
===================================================================
--- trunk/Build/source/texk/mendexk/tests/nested3.ind	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/nested3.ind	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,40 @@
+\begin{theindex}
+
+  \item_0 a(0) 1
+    \item_01 a(1) 2
+      \item_12 a(2) 3
+  \item_0 ab(0) 6
+  \item_0 ad
+    \item_x1 a(1) 8
+    \item_1 b(1) 9
+  \item_0 ae
+    \item_x1 a
+      \item_x2 a(2) 11
+    \item_1 b
+      \item_x2 b(2) 12
+
+  \indexspace
+
+  \item_0 pa(0) 21
+    \item_01 qa
+      \item_x2 ra(2) 22
+
+  \indexspace
+
+  \item_0 xa(0) 1
+  \item_0 xb(0) 1
+  \item_0 xc(0) 1
+
+  \indexspace
+
+  \item_0 ya
+    \item_x1 x(1) 1
+    \item_1 y(1) 1
+    \item_1 z(1) 1
+  \item_0 yb
+    \item_x1 x
+      \item_x2 x(2) 1
+      \item_2 y(2) 1
+      \item_2 z(2) 1
+
+\end{theindex}

Added: trunk/Build/source/texk/mendexk/tests/nested3.ist
===================================================================
--- trunk/Build/source/texk/mendexk/tests/nested3.ist	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/nested3.ist	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,10 @@
+item_0 "\n  \\item_0 "
+item_1 "\n    \\item_1 "
+item_2 "\n      \\item_2 "
+item_01 "\n    \\item_01 "
+item_12 "\n      \\item_12 "
+item_x1 "\n    \\item_x1 "
+item_x2 "\n      \\item_x2 "
+delim_0 "(0) "
+delim_1 "(1) "
+delim_2 "(2) "

Added: trunk/Build/source/texk/mendexk/tests/ok-tort.ind
===================================================================
--- trunk/Build/source/texk/mendexk/tests/ok-tort.ind	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/ok-tort.ind	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,24 @@
+\begin{theindex}
+
+  \item bad-encaps, \ii{5--7}
+
+  \indexspace
+
+  \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
+
+  \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
+
+  \item ok-encaps, \ii{5--7}
+
+\end{theindex}

Added: trunk/Build/source/texk/mendexk/tests/pprec.test
===================================================================
--- trunk/Build/source/texk/mendexk/tests/pprec.test	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/pprec.test	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,68 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2021-2024 Japanese TeX Development Community <issue at texjp.org>
+# Copyright 2017-2022 Karl Berry <tex-live at tug.org>
+# Copyright 2013 Peter Breitenlohner <tex-live at 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 range*.* pprec*.* romalp*.*
+rc=0
+
+# 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 \
+	-o range$num.ind1 -t range$num.ilg \
+	&& diff $srcdir/tests/range$num.ind range$num.ind1 || rc=6
+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 \
+	-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 \
+	-o pprec$sfx-$num.ind1 -t pprec$sfx-$num.ilg \
+	&& diff $srcdir/tests/pprec$sfx-$num.ind pprec$sfx-$num.ind1 || rc=8
+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 \
+	-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 \
+	-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 \
+	-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 \
+	-o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+	&& diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=12
+done
+
+
+exit $rc


Property changes on: trunk/Build/source/texk/mendexk/tests/pprec.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/mendexk/tests/toodeep.idx
===================================================================
--- trunk/Build/source/texk/mendexk/tests/toodeep.idx	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/toodeep.idx	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,6 @@
+\indexentry{a}{1}
+\indexentry{a!a}{2}
+\indexentry{a!a!a}{3}
+\indexentry{a!a!a!a}{4}
+\indexentry{a!a!a!a!a}{5}
+\indexentry{a!a!a!a!a!a}{6}

Added: trunk/Build/source/texk/mendexk/tests/tort.idx
===================================================================
--- trunk/Build/source/texk/mendexk/tests/tort.idx	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/tort.idx	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,53 @@
+\indexentry{@illegal-null-field}{9}
+\indexentry{!illegal-null-field}{10}
+\indexentry{too-may-ats at x@}{10}
+\indexentry{too-may-bangs!x!y!z}{10}
+\indexentry{too-may-bars|x|}{10}
+\indexentry{hoge!@illegal-null-field}{9}
+\indexentry{hoge!fuga!@illegal-null-field}{9}
+\indexentry{haha!@!illegal-null-field}{10}
+\indexentry{illegal-null-field-in-bangs!p!@r}{10}
+\indexentry{illegal-null-field-in-bangs!!r}{10}
+\indexentry{fff!p!q at r@s}{11}
+\indexentry{ggg!p!q|r|}{12}
+\indexentry{hhh|t at p|s}{13}
+\indexentry{iii|t!p|s}{14}
+
+\indexentry{incons-entries|xx}{6}
+\indexentry{incons-entries}{6}
+
+\indexentry{implicit-range}{10}
+\indexentry{implicit-range}{11}
+\indexentry{implicit-range}{12}
+
+\indexentry{missing(|)}{6}
+\indexentry{missing)|(}{6}
+
+\indexentry{ok-encaps|(ii}{5}
+\indexentry{ok-encaps|ii}{6}
+\indexentry{ok-encaps|)}{7}
+
+\indexentry{bad-encaps|(ii}{5}
+\indexentry{bad-encaps|ii}{6}
+\indexentry{bad-encaps|)iii}{7}
+
+\indexentry{incons-encaps|(}{5}
+\indexentry{incons-encaps|ii}{6}
+\indexentry{incons-encaps|)}{7}
+
+\indexentry{incons-encaps2|(}{5}
+\indexentry{incons-encaps2|ii}{5}
+\indexentry{incons-encaps2|)}{5}
+
+\indexentry{mixed-range|(}{i}
+\indexentry{mixed-range|)}{6}
+
+\indexentry{mixed-range1|(}{i}
+\indexentry{mixed-range1}{iv}
+\indexentry{mixed-range1}{3}
+\indexentry{mixed-range1|)}{6}
+
+\indexentry{mixed-range2|(}{i}
+\indexentry{mixed-range2|xx}{ii}
+\indexentry{mixed-range2|yy}{3}
+\indexentry{mixed-range2|)}{6}

Added: trunk/Build/source/texk/mendexk/tests/tortW.idx
===================================================================
--- trunk/Build/source/texk/mendexk/tests/tortW.idx	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/tortW.idx	2024-11-09 10:39:26 UTC (rev 72805)
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\indexentry{incons-entries|xx}{6}
+\indexentry{incons-entries}{6}
+
+\indexentry{implicit-range}{10}
+\indexentry{implicit-range}{11}
+\indexentry{implicit-range}{12}
+
+\indexentry{missing(|)}{6}
+\indexentry{missing)|(}{6}
+
+\indexentry{ok-encaps|(ii}{5}
+\indexentry{ok-encaps|ii}{6}
+\indexentry{ok-encaps|)}{7}
+
+\indexentry{bad-encaps|(ii}{5}
+\indexentry{bad-encaps|ii}{6}
+\indexentry{bad-encaps|)iii}{7}
+
+\indexentry{incons-encaps|(}{5}
+\indexentry{incons-encaps|ii}{6}
+\indexentry{incons-encaps|)}{7}
+
+\indexentry{incons-encaps2|(}{5}
+\indexentry{incons-encaps2|ii}{5}
+\indexentry{incons-encaps2|)}{5}
+
+\indexentry{mixed-range|(}{i}
+\indexentry{mixed-range|)}{6}
+
+\indexentry{mixed-range1|(}{i}
+\indexentry{mixed-range1}{iv}
+\indexentry{mixed-range1}{3}
+\indexentry{mixed-range1|)}{6}
+
+\indexentry{mixed-range2|(}{i}
+\indexentry{mixed-range2|xx}{ii}
+\indexentry{mixed-range2|yy}{3}
+\indexentry{mixed-range2|)}{6}

Modified: trunk/Build/source/texk/mendexk/version.h
===================================================================
--- trunk/Build/source/texk/mendexk/version.h	2024-11-09 10:39:22 UTC (rev 72804)
+++ trunk/Build/source/texk/mendexk/version.h	2024-11-09 10:39:26 UTC (rev 72805)
@@ -1,2 +1,2 @@
-#define VERSION  "version " PACKAGE_VERSION " [12-Jun-2022]"
+#define VERSION  "version " PACKAGE_VERSION " [09-Nov-2024]"
 #define BUG_ADDRESS "issue at texjp.org"



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