File 3692-Add-detailed-instructions-for-updating-Unicode-Chara.patch of Package erlang

From 6521e807f1c7e5434952f9bfedae9711b0eae739 Mon Sep 17 00:00:00 2001
From: Eksperimental <eksperimental@autistici.org>
Date: Mon, 10 Jan 2022 14:46:47 -0500
Subject: [PATCH] Add detailed instructions for updating Unicode Character
 Database

---
 lib/stdlib/uc_spec/README-UPDATE.txt | 52 +++++++++++++++++++++++-----
 1 file changed, 43 insertions(+), 9 deletions(-)

diff --git a/lib/stdlib/uc_spec/README-UPDATE.txt b/lib/stdlib/uc_spec/README-UPDATE.txt
index 07ebb4726a..d6b8488928 100644
--- a/lib/stdlib/uc_spec/README-UPDATE.txt
+++ b/lib/stdlib/uc_spec/README-UPDATE.txt
@@ -1,11 +1,45 @@
-When updating the unicode version copy the necessary files to this
-directory.
-And update the test files in stdlib/test/unicode_util_SUITE_data/*
-
 Unicode 14.0.0 was updated from:
-https://www.unicode.org/Public/14.0.0/ucd/
-https://www.unicode.org/Public/14.0.0/ucd/auxiliary/
-https://www.unicode.org/Public/14.0.0/ucd/emoji/
+- https://www.unicode.org/Public/13.0.0/ucd/
+- https://www.unicode.org/Public/13.0.0/ucd/auxiliary/
+- https://www.unicode.org/Public/13.0.0/ucd/emoji/
+
+When updating the Unicode version please follow these steps:
+
+The latest vesrion of the Unicode Character Database can be found at
+https://www.unicode.org/Public/UCD/latest/ucd/
+
+1. Copy the following files to lib/stdlib/uc_spec/ replacing existing ones.
+No subfolder should be created.
+  - CaseFolding.txt
+  - CompositionExclusions.txt
+  - PropList.txt
+  - SpecialCasing.txt
+  - UnicodeData.txt
+  - auxiliary/GraphemeBreakProperty.txt
+  - emoji/emoji-data.txt
+
+2. Copy the following test files to lib/stdlib/test/unicode_util_SUITE_data/
+replacing existing ones. No subfolder should be created.
+  - NormalizationTest.txt
+  - auxiliary/GraphemeBreakTest.txt
+  - auxiliary/LineBreakTest.txt
+
+3. Update the "spec_version()" function in the generator by replacing the Unicode
+version in lib/stdlib/uc_spec/gen_unicode_mod.escript
+
+4. Read the realease notes by visiting https://www.unicode.org/versions/latest/
+and assess if additional changes are necessary in the Erlang code.
+
+5. Replace all ocurrences of previous version of Unicode with the new one in
+this very same file (lib/stdlib/uc_spec/README-UPDATE.txt).
+Remember to update these instructions if a new file is added or any other change
+is required for future version updates.
 
-Update the spec_version(..) function in the generator,
-gen_unicode_mod.escript
+6. Run the test for the Unicode suite from the OTP repository root dir.
+   $ export ERL_TOP=$PWD
+   $ export PATH=$ERL_TOP/bin:$PATH
+   $ ./otp_build all -a && ./otp_build tests
+   $ cd release/tests/test_server
+   $ erl
+   erl> ts:install().
+   erl> ts:run(stdlib, unicode_SUITE, [batch]).
-- 
2.31.1

openSUSE Build Service is sponsored by