gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 02/02: UTIL: Add UTF-8 NFC test


From: gnunet
Subject: [gnunet] 02/02: UTIL: Add UTF-8 NFC test
Date: Thu, 20 Jan 2022 15:17:09 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 18bf1b905871fe7b5509f9bc262b978e33f506a7
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Jan 18 14:05:12 2022 +0100

    UTIL: Add UTF-8 NFC test
---
 src/util/test_strings.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/util/test_strings.c b/src/util/test_strings.c
index d986486d0..1ecd31464 100644
--- a/src/util/test_strings.c
+++ b/src/util/test_strings.c
@@ -111,6 +111,13 @@ main (int argc, char *argv[])
     GNUNET_break (0);
     return 1;
   }
+  /* Normalization */
+  r = "q\u0307\u0323"; /* Non-canonical order */
+
+  GNUNET_STRINGS_utf8_normalize (r,
+                                 buf);
+  GNUNET_assert (0 == strcmp ("q\u0323\u0307", buf));
+
   b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "ASCII");
   WANT ("TEST", b);
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]