aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-01-18 14:05:12 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-01-18 14:05:12 +0100
commit18bf1b905871fe7b5509f9bc262b978e33f506a7 (patch)
treedf375f6598e6c5332b529937b0d83820cd158f1a /src/util
parent54554ca531d018b965cc04fe5046e7df68eb27f9 (diff)
downloadgnunet-18bf1b905871fe7b5509f9bc262b978e33f506a7.tar.gz
gnunet-18bf1b905871fe7b5509f9bc262b978e33f506a7.zip
UTIL: Add UTF-8 NFC test
Diffstat (limited to 'src/util')
-rw-r--r--src/util/test_strings.c7
1 files changed, 7 insertions, 0 deletions
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[])
111 GNUNET_break (0); 111 GNUNET_break (0);
112 return 1; 112 return 1;
113 } 113 }
114 /* Normalization */
115 r = "q\u0307\u0323"; /* Non-canonical order */
116
117 GNUNET_STRINGS_utf8_normalize (r,
118 buf);
119 GNUNET_assert (0 == strcmp ("q\u0323\u0307", buf));
120
114 b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "ASCII"); 121 b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "ASCII");
115 WANT ("TEST", b); 122 WANT ("TEST", b);
116 123