From 3bcc6fd39f2681f3ec64b795e4362aa034dec2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 4 Aug 2020 22:25:10 +0400 Subject: [PATCH] guri: add a test to check ipv6 with zoneid URI to string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test was failing since commit 20ae4b46d ("uri: do not add ipv6 brackets on non-ip host"). Signed-off-by: Marc-André Lureau --- glib/tests/uri.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glib/tests/uri.c b/glib/tests/uri.c index 99845c4d0..74ad24d98 100644 --- a/glib/tests/uri.c +++ b/glib/tests/uri.c @@ -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,