summaryrefslogtreecommitdiff
path: root/glib/tests/utf8-misc.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a SPDX LicenseRef for the license historically used for testsSimon McVittie2022-11-021-0/+2
| | | | | | | | | | | | | Some of GLib's unit tests are under an apparently GLib-specific permissive license, vaguely similar to the BSD/MIT family but with the GPL's lack-of-warranty wording. This is not on SPDX's list of well-known licenses, so we need to use a custom license name prefixed with LicenseRef if we want to represent this in SPDX/REUSE syntax. Most of the newer tests seem to be licensed under LGPL-2.1-or-later instead. Signed-off-by: Simon McVittie <smcv@collabora.com>
* gutf8: add string length check when ending character offset is -1Chen Guanqiao2021-11-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Some function such as atk_text_get_text, use -1 to indicate the end of the string. And an crash occurs when the -1 is passed to g_utf8_substring. Call Trace: 0 __memmove_avx_unaligned_erms 1 memcpy 2 g_utf8_substring 3 impl_GetText 4 handle_other 5 handle_message 6 _dbus_object_tree_dispatch_and_unlock 7 dbus_connection_dispatch 8 dbus_connection_dispatch 9 () 10 g_main_dispatch 11 g_main_context_dispatch 12 g_main_context_iterate 13 g_main_context_iteration 14 g_application_run 15 main Signed-off-by: Chen Guanqiao <chen.chenchacha@foxmail.com>
* gutf8: Fix length handling in g_utf8_make_valid()Ole André Vadla Ravnås2017-10-251-0/+5
| | | | | | | We cannot blindly append the remainder when a length was provided because the string isn't nul-terminated. https://bugzilla.gnome.org/show_bug.cgi?id=789444
* utf8: add unit test for g_utf8_make_validPaolo Borelli2017-03-041-0/+22
|
* [test] Move non-utf8 tests into unicode.cBehdad Esfahbod2011-07-141-513/+0
|
* Add tests for Unicode canonical composition/decompositionBehdad Esfahbod2011-07-141-1/+106
| | | | Also update compose()/decompose() API corner cases and docs.
* Unicode: add a g_utf8_substring convenience apiMatthias Clasen2011-06-231-0/+21
| | | | | This function is useful in the GTK+ accessibility implementations, and seems like a nice thing to have around in general.
* Bug 648966 - Update g_unichar_iswide and g_unichar_iswide_cjkBehdad Esfahbod2011-05-021-4/+87
| | | | Add tests.
* Update to Unicode 6.0Behdad Esfahbod2011-01-211-9/+11
| | | | | | | One new GUnicodeBreak enum member. Three new GUnicodeScript members, and one member renamed to fix a typo. Tests, docs, and scripts are updated. PCRE update still needed.
* Remove duplicate utf8 strreverse testMatthias Clasen2010-07-301-0/+18
| | | | Also add some tests for find next/prev char.
* Add tests for g_utf8_strreverseMatthias Clasen2010-07-301-0/+26
|
* Add some more unicode property testsMatthias Clasen2010-06-231-1/+31
|
* Add some more Unicode testsMatthias Clasen2010-06-211-0/+263
|
* Add a test for g_unichar_validateMatthias Clasen2010-06-211-0/+12
|
* Some more utf8 testsMatthias Clasen2010-06-201-0/+99