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>
This commit is contained in:
Marc-André Lureau 2020-06-30 18:15:45 +04:00
parent 591d8676ee
commit e2d3349c56

View File

@ -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;