[c22e1a4acbd2d996ff19a852585f9434883c30124f6b118eb9152fe4e5ee7994: 4/8] tests/uri: add g_uri_parse_params() corner-cases



commit e2d3349c568c2831fdbb78a53380910182cd1f1a
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Tue Jun 30 18:15:45 2020 +0400

    tests/uri: add g_uri_parse_params() corner-cases
    
    Add a test for empty key & empty value, and a case for missing =.
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 glib/tests/uri.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/glib/tests/uri.c b/glib/tests/uri.c
index f429592ac..ee4242de5 100644
--- a/glib/tests/uri.c
+++ b/glib/tests/uri.c
@@ -1286,6 +1286,8 @@ test_uri_parse_params (gconstpointer test_data)
       { "p1=%00", "&", G_URI_PARAMS_NONE, -1, { NULL, }},
       { "p1=foo&P1=bar", "&", G_URI_PARAMS_CASE_INSENSITIVE, 1, { "p1", "bar", NULL, }},
       { "=%", "&", G_URI_PARAMS_NONE, 1, { "", "%", NULL, }},
+      { "=", "&", G_URI_PARAMS_NONE, 1, { "", "", NULL, }},
+      { "foo", "&", G_URI_PARAMS_NONE, -1, { NULL, }},
     };
   gsize i;
 


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