Commit 1ef6e840 authored by Philip Withnall's avatar Philip Withnall

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's avatarPhilip Withnall <withnall@endlessm.com>
parent 59eb3c5b
......@@ -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() */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment