[glib/glib-2-68: 4/8] test_string_replace: Expand test coverage




commit d5876905347685ceb78de15def92e268befeee3d
Author: Simon McVittie <smcv collabora com>
Date:   Mon Aug 2 11:27:24 2021 +0100

    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>

 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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]