From: Sebastian Dröge Date: Tue, 15 Feb 2011 21:49:26 +0000 (+0100) Subject: file{src,sink}: Fix unit tests X-Git-Tag: RELEASE-0.10.33~362 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39eeab382c6c0710bd0aeee2c66a3b369cc7d6ba;p=platform%2Fupstream%2Fgstreamer.git file{src,sink}: Fix unit tests filesink and filesrc should return exactly the same URI as passed and must not escape path separators. --- diff --git a/tests/check/elements/filesink.c b/tests/check/elements/filesink.c index 5e06257..672314a 100644 --- a/tests/check/elements/filesink.c +++ b/tests/check/elements/filesink.c @@ -265,13 +265,13 @@ GST_START_TEST (test_uri_interface) g_free (location); location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (filesink)); - fail_unless_equals_string (location, "file://%2Fi%2Fdo%2Fnot%2Fexist"); + fail_unless_equals_string (location, "file:///i/do/not/exist"); /* should accept file:///foo/bar URIs */ fail_unless (gst_uri_handler_set_uri (GST_URI_HANDLER (filesink), "file:///foo/bar")); location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (filesink)); - fail_unless_equals_string (location, "file://%2Ffoo%2Fbar"); + fail_unless_equals_string (location, "file:///foo/bar"); g_object_get (G_OBJECT (filesink), "location", &location, NULL); fail_unless_equals_string (location, "/foo/bar"); g_free (location); @@ -280,7 +280,7 @@ GST_START_TEST (test_uri_interface) fail_unless (gst_uri_handler_set_uri (GST_URI_HANDLER (filesink), "file://localhost/foo/baz")); location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (filesink)); - fail_unless_equals_string (location, "file://%2Ffoo%2Fbaz"); + fail_unless_equals_string (location, "file:///foo/baz"); g_object_get (G_OBJECT (filesink), "location", &location, NULL); fail_unless_equals_string (location, "/foo/baz"); g_free (location); diff --git a/tests/check/elements/filesrc.c b/tests/check/elements/filesrc.c index c2059fa..ea64b08 100644 --- a/tests/check/elements/filesrc.c +++ b/tests/check/elements/filesrc.c @@ -344,13 +344,13 @@ GST_START_TEST (test_uri_interface) g_free (location); location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (src)); - fail_unless_equals_string (location, "file://%2Fi%2Fdo%2Fnot%2Fexist"); + fail_unless_equals_string (location, "file:///i/do/not/exist"); /* should accept file:///foo/bar URIs */ fail_unless (gst_uri_handler_set_uri (GST_URI_HANDLER (src), "file:///foo/bar")); location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (src)); - fail_unless_equals_string (location, "file://%2Ffoo%2Fbar"); + fail_unless_equals_string (location, "file:///foo/bar"); g_object_get (G_OBJECT (src), "location", &location, NULL); fail_unless_equals_string (location, "/foo/bar"); g_free (location); @@ -359,7 +359,7 @@ GST_START_TEST (test_uri_interface) fail_unless (gst_uri_handler_set_uri (GST_URI_HANDLER (src), "file://localhost/foo/baz")); location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (src)); - fail_unless_equals_string (location, "file://%2Ffoo%2Fbaz"); + fail_unless_equals_string (location, "file:///foo/baz"); g_object_get (G_OBJECT (src), "location", &location, NULL); fail_unless_equals_string (location, "/foo/baz"); g_free (location);