test_string_replace: Expand test coverage

These are taken from another project (steam-runtime-tools) where I
implemented a similar replace method before realising that more recent
GLib versions had g_string_replace().

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2021-08-02 11:27:24 +01:00
parent c64e6cfc79
commit 7d35e49c42

View File

@ -518,6 +518,16 @@ test_string_replace (void)
{ "aaaaaaaa", "a", "abcdefghijkl", 0,
"abcdefghijklabcdefghijklabcdefghijklabcdefghijklabcdefghijklabcdefghijklabcdefghijklabcdefghijkl",
8 },
{ "/usr/$LIB/libMangoHud.so", "$LIB", "lib32", 0,
"/usr/lib32/libMangoHud.so", 1 },
{ "food for foals", "o", "", 0,
"fd fr fals", 4 },
{ "aaa", "a", "aaa", 0,
"aaaaaaaaa", 3 },
{ "aaa", "a", "", 0,
"", 3 },
{ "aaa", "aa", "bb", 0,
"bba", 1 },
};
gsize i;