texlive[60326] Build/source/texk/upmendex: upmendex: initialize a

commits+takuji at tug.org commits+takuji at tug.org
Thu Aug 26 15:22:58 CEST 2021


Revision: 60326
          http://tug.org/svn/texlive?view=revision&revision=60326
Author:   takuji
Date:     2021-08-26 15:22:58 +0200 (Thu, 26 Aug 2021)
Log Message:
-----------
upmendex: initialize a variable

Modified Paths:
--------------
    trunk/Build/source/texk/upmendex/ChangeLog
    trunk/Build/source/texk/upmendex/sort.c
    trunk/Build/source/texk/upmendex/tests/upmendex.test

Added Paths:
-----------
    trunk/Build/source/texk/upmendex/tests/locale1.ind
    trunk/Build/source/texk/upmendex/tests/locale1.ist

Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog	2021-08-25 23:48:27 UTC (rev 60325)
+++ trunk/Build/source/texk/upmendex/ChangeLog	2021-08-26 13:22:58 UTC (rev 60326)
@@ -1,3 +1,10 @@
+2021-08-26  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* sort.c:
+	Initialize a variable.
+	* tests/upmendex.test, tests/locale1.{ist,ind}:
+	Add a new test for "icu_locale".
+
 2021-08-25  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* sort.c:

Modified: trunk/Build/source/texk/upmendex/sort.c
===================================================================
--- trunk/Build/source/texk/upmendex/sort.c	2021-08-25 23:48:27 UTC (rev 60325)
+++ trunk/Build/source/texk/upmendex/sort.c	2021-08-26 13:22:58 UTC (rev 60326)
@@ -349,6 +349,7 @@
 			strncpy(tmp,(char *)&src[j],i-j+1);
 			tmp[i-j+1]='\0';
 			k=u_strlen(dest);
+			status=U_ZERO_ERROR;
 			u_strFromUTF8(&dest[k], STYBUFSIZE-k, NULL, tmp, -1, &status);
 			if (U_FAILURE(status)) {
 				verb_printf(efp, "\n[ICU] Input string seems malformed.: %s\n", u_errorName(status));

Added: trunk/Build/source/texk/upmendex/tests/locale1.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/locale1.ind	                        (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/locale1.ind	2021-08-26 13:22:58 UTC (rev 60326)
@@ -0,0 +1,37 @@
+\begin{theindex}
+
+\centerline{\bfseries ◆◆◆ A ◆◆◆}\par\nobreak
+  \item a\leaders\hbox{$\cdot$}\hfill 401
+  \item A\leaders\hbox{$\cdot$}\hfill 400
+
+  \indexspace
+
+\centerline{\bfseries ◆◆◆ B ◆◆◆}\par\nobreak
+  \item b\leaders\hbox{$\cdot$}\hfill 403
+  \item B\leaders\hbox{$\cdot$}\hfill 402
+
+  \indexspace
+
+\centerline{\bfseries ◆◆◆ C ◆◆◆}\par\nobreak
+  \item c\leaders\hbox{$\cdot$}\hfill 405
+  \item C\leaders\hbox{$\cdot$}\hfill 404
+
+  \indexspace
+
+\centerline{\bfseries ◆◆◆ Ç ◆◆◆}\par\nobreak
+  \item ç\leaders\hbox{$\cdot$}\hfill 407
+  \item Ç\leaders\hbox{$\cdot$}\hfill 406
+
+  \indexspace
+
+\centerline{\bfseries ◆◆◆ U ◆◆◆}\par\nobreak
+  \item u\leaders\hbox{$\cdot$}\hfill 409
+  \item U\leaders\hbox{$\cdot$}\hfill 408
+
+  \indexspace
+
+\centerline{\bfseries ◆◆◆ Ü ◆◆◆}\par\nobreak
+  \item ü\leaders\hbox{$\cdot$}\hfill 411
+  \item Ü\leaders\hbox{$\cdot$}\hfill 410
+
+\end{theindex}

Added: trunk/Build/source/texk/upmendex/tests/locale1.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/locale1.ist	                        (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/locale1.ist	2021-08-26 13:22:58 UTC (rev 60326)
@@ -0,0 +1 @@
+icu_locale "az"

Modified: trunk/Build/source/texk/upmendex/tests/upmendex.test
===================================================================
--- trunk/Build/source/texk/upmendex/tests/upmendex.test	2021-08-25 23:48:27 UTC (rev 60325)
+++ trunk/Build/source/texk/upmendex/tests/upmendex.test	2021-08-26 13:22:58 UTC (rev 60326)
@@ -7,7 +7,7 @@
 TEXMFCNF=$srcdir/../kpathsea
 export TEXMFCNF
 
-rm -f foo.* uni.* pprec*.* rangetwo.* rule*.*
+rm -f foo.* uni.* pprec*.* rangetwo.* locale*.* rule*.*
 
 ./upmendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
 	&& diff $srcdir/tests/foo.ind foo.ind1 || exit 1
@@ -46,6 +46,11 @@
 	-o pprecA-2.ind1 -t pprecA-2.ilg \
 	&& diff $srcdir/tests/pprecA-2.ind pprecA-2.ind1 || exit 1
 
+# test for icu_locale
+./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/locale1.ist $srcdir/tests/rule.idx \
+	-o locale1.ind1 -t locale1.ilg \
+	&& diff $srcdir/tests/locale1.ind locale1.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 \



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