diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-08-26 13:22:58 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-08-26 13:22:58 +0000 |
commit | a40db862cb469df927219a1001220ec7feb760d3 (patch) | |
tree | 49d39e722bbaeef3a3fa7ffd73d59a4ac81ed29b | |
parent | f19d22322d2af7e917d1c9f9b05b8fa0e0e1b5b1 (diff) |
upmendex: initialize a variable
git-svn-id: svn://tug.org/texlive/trunk@60326 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/upmendex/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/upmendex/sort.c | 1 | ||||
-rw-r--r-- | Build/source/texk/upmendex/tests/locale1.ind | 37 | ||||
-rw-r--r-- | Build/source/texk/upmendex/tests/locale1.ist | 1 | ||||
-rwxr-xr-x | Build/source/texk/upmendex/tests/upmendex.test | 7 |
5 files changed, 52 insertions, 1 deletions
diff --git a/Build/source/texk/upmendex/ChangeLog b/Build/source/texk/upmendex/ChangeLog index 9bbb750dfda..a105b375f9b 100644 --- a/Build/source/texk/upmendex/ChangeLog +++ b/Build/source/texk/upmendex/ChangeLog @@ -1,3 +1,10 @@ +2021-08-26 TANAKA Takuji <ttk@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@t-lab.opal.ne.jp> * sort.c: diff --git a/Build/source/texk/upmendex/sort.c b/Build/source/texk/upmendex/sort.c index 38b64feeebc..d585b385e1b 100644 --- a/Build/source/texk/upmendex/sort.c +++ b/Build/source/texk/upmendex/sort.c @@ -349,6 +349,7 @@ static int unescape(const unsigned char *src, UChar *dest) 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)); diff --git a/Build/source/texk/upmendex/tests/locale1.ind b/Build/source/texk/upmendex/tests/locale1.ind new file mode 100644 index 00000000000..89997778f58 --- /dev/null +++ b/Build/source/texk/upmendex/tests/locale1.ind @@ -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} diff --git a/Build/source/texk/upmendex/tests/locale1.ist b/Build/source/texk/upmendex/tests/locale1.ist new file mode 100644 index 00000000000..cf9e67da6ea --- /dev/null +++ b/Build/source/texk/upmendex/tests/locale1.ist @@ -0,0 +1 @@ +icu_locale "az" diff --git a/Build/source/texk/upmendex/tests/upmendex.test b/Build/source/texk/upmendex/tests/upmendex.test index 59074579b24..26dfe4284b7 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.* 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 @@ 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_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 \ |