diff --git a/glib/tests/uri.c b/glib/tests/uri.c index 9658138f6..6de4c9cdc 100644 --- a/glib/tests/uri.c +++ b/glib/tests/uri.c @@ -701,14 +701,28 @@ static const UriAbsoluteTest absolute_tests[] = { { "http-ish", NULL, "host", -1, "/path", NULL, NULL } }, /* IPv6 scope ID parsing (both correct and incorrect) */ + { "http://[fe80::dead:beef%]/", G_URI_FLAGS_PARSE_RELAXED, FALSE, G_URI_ERROR_BAD_HOST, + { NULL, NULL, NULL, -1, NULL, NULL, NULL } }, { "http://[fe80::dead:beef%em1]/", G_URI_FLAGS_PARSE_RELAXED, TRUE, 0, { "http", NULL, "fe80::dead:beef%em1", -1, "/", NULL, NULL } }, + { "http://[fe80::dead:beef%em1]/", G_URI_FLAGS_NONE, FALSE, G_URI_ERROR_BAD_HOST, + { NULL, NULL, NULL, -1, NULL, NULL, NULL } }, { "http://[fe80::dead:beef%25em1]/", G_URI_FLAGS_NONE, TRUE, 0, { "http", NULL, "fe80::dead:beef%em1", -1, "/", NULL, NULL } }, + { "http://[fe80::dead:beef%25em1%20]/", G_URI_FLAGS_NONE, TRUE, 0, + { "http", NULL, "fe80::dead:beef%em1 ", -1, "/", NULL, NULL } }, + { "http://[fe80::dead:beef%25em%31]/", G_URI_FLAGS_NONE, TRUE, 0, + { "http", NULL, "fe80::dead:beef%em1", -1, "/", NULL, NULL } }, { "http://[fe80::dead:beef%10]/", G_URI_FLAGS_PARSE_RELAXED, TRUE, 0, { "http", NULL, "fe80::dead:beef%10", -1, "/", NULL, NULL } }, + { "http://[fe80::dead:beef%10]/", G_URI_FLAGS_NONE, FALSE, G_URI_ERROR_BAD_HOST, + { NULL, NULL, NULL, -1, NULL, NULL, NULL } }, { "http://[fe80::dead:beef%25]/", G_URI_FLAGS_PARSE_RELAXED, TRUE, 0, { "http", NULL, "fe80::dead:beef%25", -1, "/", NULL, NULL } }, + { "http://[fe80::dead:beef%25]/", G_URI_FLAGS_NONE, FALSE, G_URI_ERROR_BAD_HOST, + { NULL, NULL, NULL, -1, NULL, NULL, NULL } }, + { "http://[192.168.0.1%25em1]/", G_URI_FLAGS_NONE, FALSE, G_URI_ERROR_BAD_HOST, + { NULL, NULL, NULL, -1, NULL, NULL, NULL } }, }; static void