mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
tests: Add some tests for expanding invalid escapes with g_strcompress()
This brings the branch coverage of `g_strcompress()` up to 100%. Yay. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
59eb3c5bdb
commit
1ef6e84012
@ -741,6 +741,12 @@ test_strcompress_strescape (void)
|
||||
g_assert_cmpstr (tmp, ==, "héllø there⸘");
|
||||
g_free (tmp);
|
||||
g_free (str);
|
||||
|
||||
/* Test expanding invalid escapes */
|
||||
str = g_strcompress ("\\11/ \\118 \\8aa \\19");
|
||||
g_assert_nonnull (str);
|
||||
g_assert_cmpstr (str, ==, "\t/ \t8 8aa \0019");
|
||||
g_free (str);
|
||||
}
|
||||
|
||||
/* Testing g_ascii_strcasecmp() and g_ascii_strncasecmp() */
|
||||
|
Loading…
Reference in New Issue
Block a user