]> Kevux Git Server - fll/commit
Bugfix: UTF-8 endianess tests fail and improve seek to functions for UTF-8.
authorKevin Day <thekevinday@gmail.com>
Sun, 3 Apr 2022 00:41:34 +0000 (19:41 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 3 Apr 2022 00:41:34 +0000 (19:41 -0500)
commit25c0e1862fa241b45419ca038ade57ce56a01a94
treeb711ce002cf6fccaf77a2f723e4ba3fd288c0a5a
parent2bbec50a358614640e9eb98dea92a5a63ab5af02
Bugfix: UTF-8 endianess tests fail and improve seek to functions for UTF-8.

The original commit dda60cc8d9cad69b55e7d79b4c052677b03b4413 introduced reversed endianness logic.
The tests passed for this and so the tests were wrong.

The commit that fixed the reversed endianness problems is 78daa0d760fbcc767dd099d68ae02d23b3df4991.
These changes revealed the test problems due to the tests now failing.

Fix the tests.
Make a new character type for the EOL, EOS, and placeholder in a way that is more consistent with the character macros for the f_char_t.

The F_utf_substitute_open_box_d_length and F_utf_substitute_open_box_shouldered_d_length should have _s_ rather than _d_ in their names.

Change the UTF-8 seek to functions to not need to check for URL fragments.
Change the UTF-8 seek to functions to accept f_utf_char_t rather than f_char_t.
This completely makes more sense.
This allows for searching a f_utf_string_t using a f_utf_char_t.
The tests are expecting this behavior earlier and they only happened to succeed due to the coincidence of the bitwise order of the previously incorrect tests.

This swaps the bitwise order of the strings.
More than likely I need a macro check to handle big endian as well.
This is left to changes in the future.
The 0.6.x stable series does not guarantee big endian support.
The 0.8.x stable series does guarantee big endian support because I will be working on adding networking support.
Leave the bitwise improvements and tests for the next development cycle so that I can focus on pushing out the 0.6.x stable release.
If I have the time, I might still fix this after the release candidate is released as I will most likely be improving the tests and fixing any discovered problems.
63 files changed:
level_0/f_utf/c/utf/common.c
level_0/f_utf/c/utf/common.h
level_0/f_utf/c/utf/dynamic.c
level_0/f_utf/c/utf/dynamic.h
level_0/f_utf/c/utf/string.c
level_0/f_utf/c/utf/string.h
level_0/f_utf/tests/unit/c/test-utf-append.c
level_0/f_utf/tests/unit/c/test-utf-append_assure.c
level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.c
level_0/f_utf/tests/unit/c/test-utf-append_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_append.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.h
level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.c
level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.h
level_0/f_utf/tests/unit/c/test-utf-dynamics_append.c
level_0/f_utf/tests/unit/c/test-utf-map_multis_append.c
level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.c
level_0/f_utf/tests/unit/c/test-utf-maps_append.c
level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c
level_0/f_utf/tests/unit/c/test-utf-mash.c
level_0/f_utf/tests/unit/c/test-utf-mash_nulless.c
level_0/f_utf/tests/unit/c/test-utf-mish.c
level_0/f_utf/tests/unit/c/test-utf-mish_nulless.c
level_0/f_utf/tests/unit/c/test-utf-prepend.c
level_0/f_utf/tests/unit/c/test-utf-prepend_assure.c
level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.c
level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.c
level_0/f_utf/tests/unit/c/test-utf-seek_line.c
level_0/f_utf/tests/unit/c/test-utf-seek_line_to.c
level_0/f_utf/tests/unit/c/test-utf-seek_line_to.h
level_0/f_utf/tests/unit/c/test-utf-seek_to.c
level_0/f_utf/tests/unit/c/test-utf-seek_to.h
level_0/f_utf/tests/unit/c/test-utf-triples_append.c
level_0/f_utf/tests/unit/c/test-utf-triples_append_all.c
level_0/f_utf/tests/unit/c/test-utf-tripless_append.c
level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.c
level_0/f_utf/tests/unit/c/test-utf.c
level_1/fl_utf/c/utf.c