mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
uri: Add test for correct absolute URI handling in gst_uri_from_string_with_base()
If the second parameter is an absolute URI, the base should have no effect and the second parameter should be returned again. https://bugzilla.gnome.org/show_bug.cgi?id=755134
This commit is contained in:
parent
8421a1453c
commit
697093c7d4
1 changed files with 14 additions and 0 deletions
|
@ -782,6 +782,20 @@ GST_START_TEST (test_url_constructors)
|
|||
g_free (tmp_str);
|
||||
gst_uri_unref (url2);
|
||||
|
||||
url2 = gst_uri_from_string_with_base (url1, "http://foobar.com/bla");
|
||||
fail_unless_equals_string (gst_uri_get_scheme (url2), "http");
|
||||
fail_unless_equals_string (gst_uri_get_host (url2), "foobar.com");
|
||||
fail_unless (gst_uri_get_port (url2) == 0);
|
||||
tmp_str = gst_uri_get_path (url2);
|
||||
fail_unless_equals_string (tmp_str, "/bla");
|
||||
g_free (tmp_str);
|
||||
fail_unless (gst_uri_get_query_table (url2) == NULL);
|
||||
fail_unless (gst_uri_get_fragment (url2) == NULL);
|
||||
tmp_str = gst_uri_to_string (url2);
|
||||
fail_unless_equals_string (tmp_str, "http://foobar.com/bla");
|
||||
g_free (tmp_str);
|
||||
gst_uri_unref (url2);
|
||||
|
||||
url2 = gst_uri_copy (url1);
|
||||
fail_unless (gst_uri_equal (url1, url2));
|
||||
gst_uri_set_query_value (url2, "key", "value");
|
||||
|
|
Loading…
Reference in a new issue