mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
uri: tests: added unit test for streams ending in .. without following /
https://bugzilla.gnome.org/show_bug.cgi?id=757065
This commit is contained in:
parent
5cccf9846f
commit
5a7fc340b5
1 changed files with 18 additions and 0 deletions
|
@ -578,6 +578,24 @@ GST_START_TEST (test_url_joining)
|
||||||
gst_uri_unref (joined);
|
gst_uri_unref (joined);
|
||||||
gst_uri_unref (rel);
|
gst_uri_unref (rel);
|
||||||
|
|
||||||
|
/* test path ending in '../' */
|
||||||
|
rel = gst_uri_from_string ("one/two/../");
|
||||||
|
joined = gst_uri_join (base, rel);
|
||||||
|
l = gst_uri_to_string (joined);
|
||||||
|
fail_unless_equals_string (l, "http://example.com/path/to/dir/one/");
|
||||||
|
g_free (l);
|
||||||
|
gst_uri_unref (joined);
|
||||||
|
gst_uri_unref (rel);
|
||||||
|
|
||||||
|
/* test path ending in '..' Result should be the same as when ending in '../' */
|
||||||
|
rel = gst_uri_from_string ("one/two/..");
|
||||||
|
joined = gst_uri_join (base, rel);
|
||||||
|
l = gst_uri_to_string (joined);
|
||||||
|
fail_unless_equals_string (l, "http://example.com/path/to/dir/one/");
|
||||||
|
g_free (l);
|
||||||
|
gst_uri_unref (joined);
|
||||||
|
gst_uri_unref (rel);
|
||||||
|
|
||||||
/* test replace with absolute */
|
/* test replace with absolute */
|
||||||
rel = gst_uri_from_string ("https://ssl.example.com/new_filename.xml");
|
rel = gst_uri_from_string ("https://ssl.example.com/new_filename.xml");
|
||||||
joined = gst_uri_join (base, rel);
|
joined = gst_uri_join (base, rel);
|
||||||
|
|
Loading…
Reference in a new issue