guri: add a test to check ipv6 with zoneid URI to string

The test was failing since commit 20ae4b46d ("uri: do not add ipv6
brackets on non-ip host").

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2020-08-04 22:25:10 +04:00
parent 03550ec097
commit 3bcc6fd39f

View File

@ -915,7 +915,12 @@ test_uri_to_string (void)
tostring = g_uri_to_string (uri);
g_assert_cmpstr (tostring, ==, "scheme://userinfo@host:1234/path?query#fragment");
g_free (tostring);
g_uri_unref (uri);
uri = g_uri_build (G_URI_FLAGS_NONE, "scheme", NULL, "fe80::dead:beef%em1", -1, "", NULL, NULL);
tostring = g_uri_to_string (uri);
g_assert_cmpstr (tostring, ==, "scheme://[fe80::dead:beef%25em1]");
g_free (tostring);
g_uri_unref (uri);
uri = g_uri_build_with_user (G_URI_FLAGS_NONE, "scheme", "user", "pass", "auth", "host", 1234,