mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-25 02:18:55 +02:00
tests: Add a missing test for post-normalisation lowercasing in IDN
See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4387#note_2269324 This adds a test to increase the code coverage of `nameprep()` in `ghostutils.c`. It was previously missing coverage of the second `tolower()` operation. The new test triggers this by using a Unicode codepoint which cannot be converted to lowercase itself, but which normalises (NFKC) to uppercase characters which can — a Unicode Roman numeral. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
@@ -56,6 +56,7 @@ static const struct {
|
||||
/* uppercase characters */
|
||||
{ "EXAMPLE.COM", "example.com", FALSE, FALSE },
|
||||
{ "\xc3\x89XAMPLE.COM", "xn--xample-9ua.com", TRUE, TRUE },
|
||||
{ "Ⅷ.com", "viii.com", TRUE, FALSE },
|
||||
|
||||
/* unicode that decodes to ascii */
|
||||
{ "\xe2\x93\x94\xe2\x93\xa7\xe2\x93\x90\xe2\x93\x9c\xe2\x93\x9f\xe2\x93\x9b\xe2\x93\x94.com", "example.com", TRUE, FALSE },
|
||||
|
Reference in New Issue
Block a user