From 6f9a46f926e8cd22778416c7b5873dd5793e1d71 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 14 Sep 2025 07:34:41 +0300 Subject: [PATCH] Fix 'ucs-normalize' tests following Unciode 17.0 import * lisp/international/ucs-normalize.el (ucs-normalize-composition-exclusions): Doc fix. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--failing-lines-part1): Update to _really_ match Unicode 17.0. * admin/notes/unicode: Update instructions. --- admin/notes/unicode | 21 ++++++++++++------- lisp/international/ucs-normalize.el | 2 +- .../lisp/international/ucs-normalize-tests.el | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/admin/notes/unicode b/admin/notes/unicode index ae94b5c0a3f..21ce2c4cda3 100644 --- a/admin/notes/unicode +++ b/admin/notes/unicode @@ -97,18 +97,23 @@ might need to be updated because it knows about used and unused ranges of Unicode codepoints, which a new release of the Unicode Standard could change. -The data used by ucs-normalize.el might need to be updated. -Specifically, the values of 'ucs-normalize-composition-exclusions' and -'check-range", defined at the beginning of ucs-normalize.el, should be -verified against the latest Unicode data files. - -Run the ucs-names test: +Next, run the ucs-names test: make -C test lisp/international/mule-tests If it fails, the exclusion ranges of codepoints in -'mule-cmds-tests--ucs-names-missing-names' may need to be updated to the -added Unicode codepoints. +'mule-cmds-tests--ucs-names-missing-names' may need to be updated to +account for the added Unicode codepoints. + +The data used by ucs-normalize.el might need to be updated. +Specifically, the values of 'ucs-normalize-composition-exclusions' and +'check-range", defined at the beginning of ucs-normalize.el, should be +verified against the latest Unicode data files. But even if +ucs-normalize.el is not modified, make sure it has been byte-compiled +_after_ the lisp/international/uni-*.el files were regenerated, because +it depends on uni-decomposition.el and uni-combining.el. (We don't have +this dependency in lisp/Makefile.in because recompiling ucs-normalize.el +is expensive, and updates for a new Unicode version are rare.) Next, test normalization functions against NormalizationTests.txt, in the top-level directory run: diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el index 169593f1575..a7738f16aae 100644 --- a/lisp/international/ucs-normalize.el +++ b/lisp/international/ucs-normalize.el @@ -131,7 +131,7 @@ #x1D1BF #x1D1C0) "Composition Exclusion List. This list is taken from - https://www.unicode.org/Public/UNIDATA/15.0/CompositionExclusions.txt") + https://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt") ;; Unicode ranges where decompositions & combining characters are ;; defined. Find them by running the following Awk program on diff --git a/test/lisp/international/ucs-normalize-tests.el b/test/lisp/international/ucs-normalize-tests.el index ddc99afeaae..6e78a567670 100644 --- a/test/lisp/international/ucs-normalize-tests.el +++ b/test/lisp/international/ucs-normalize-tests.el @@ -184,7 +184,7 @@ Must be called with `ucs-normalize-tests--norm-buf' as current buffer." (should-not (ucs-normalize-tests--rule1-failing-for-partX 0))) (defconst ucs-normalize-tests--failing-lines-part1 - (list 2432)) + (list )) ;; Keep a record of failures, for consulting afterwards (the ert ;; backtrace only shows a truncated version of these lists).