summaryrefslogtreecommitdiff
path: root/test/utf8.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-08-23 17:07:27 +0200
committerAlbert Cervin <albert@acervin.com>2024-09-11 16:22:58 +0200
commit4ab7e453e26afc6e9f4938c65f89463fbba9e267 (patch)
tree4745d99e70d645a8134dafc3814dc68bf678daf4 /test/utf8.c
parent991283f684c224db46fe68738470921b8c394f13 (diff)
downloaddged-4ab7e453e26afc6e9f4938c65f89463fbba9e267.tar.gz
dged-4ab7e453e26afc6e9f4938c65f89463fbba9e267.tar.xz
dged-4ab7e453e26afc6e9f4938c65f89463fbba9e267.zip
Overhaul unicode parsing
It now instead iterates the actual unicode code points. This is better than what it was previously doing but it is still not entirely correct w.r.t to unicode sequences. This handling of unicode code points does however make it slightly easier to handle UTF-16 if needed in the future. This also adds some long needed tests for buffer methods.
Diffstat (limited to 'test/utf8.c')
-rw-r--r--test/utf8.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/test/utf8.c b/test/utf8.c
index d67c409..c5094c7 100644
--- a/test/utf8.c
+++ b/test/utf8.c
@@ -6,11 +6,6 @@
#include "assert.h"
#include "test.h"
-void test_nchars_nbytes() {
- ASSERT(utf8_nchars((uint8_t *)"👴", strlen("👴")) == 1,
- "Expected old man emoji to be 1 char");
- ASSERT(utf8_nbytes((uint8_t *)"👴", strlen("👴"), 1) == 4,
- "Expected old man emoji to be 4 bytes");
-}
+void test_nchars_nbytes() {}
void run_utf8_tests() { run_test(test_nchars_nbytes); }