From 7d35e49c4245d232b8f764b8cbf5e17f52a6baa4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 2 Aug 2021 11:27:24 +0100 Subject: [PATCH] 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 --- glib/tests/string.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/glib/tests/string.c b/glib/tests/string.c index 72c9016dd..333e0254e 100644 --- a/glib/tests/string.c +++ b/glib/tests/string.c @@ -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;