file{src,sink}: Fix unit tests
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 15 Feb 2011 21:49:26 +0000 (22:49 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 15 Feb 2011 21:57:28 +0000 (22:57 +0100)
filesink and filesrc should return exactly the same URI as passed
and must not escape path separators.

tests/check/elements/filesink.c
tests/check/elements/filesrc.c

index 5e06257..672314a 100644 (file)
@@ -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);
index c2059fa..ea64b08 100644 (file)
@@ -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);