42 |
42 |
43 #if EMULATOR |
43 #if EMULATOR |
44 static GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*) |
44 static GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*) |
45 #define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)()) |
45 #define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)()) |
46 #else |
46 #else |
47 IMPORT_C extern GList *buffers; |
47 extern GList *buffers; |
48 #endif |
48 #endif |
49 |
49 |
50 void create_xml(int result) |
50 void create_xml(int result) |
51 { |
51 { |
52 |
|
53 if(result) |
52 if(result) |
54 { |
|
55 assert_failed = 1; |
53 assert_failed = 1; |
56 } |
54 |
57 |
|
58 testResultXml(xmlfile); |
55 testResultXml(xmlfile); |
59 close_log_file(); |
56 close_log_file(); |
60 |
|
61 if(result) |
|
62 { |
|
63 exit (-1); |
|
64 } |
|
65 |
|
66 } |
57 } |
67 |
58 |
68 #include "libgstreamer_wsd_solution.h" |
59 #include "libgstreamer_wsd_solution.h" |
69 static gboolean have_eos = FALSE; |
60 static gboolean have_eos = FALSE; |
70 static GCond *eos_cond; |
61 static GCond *eos_cond; |
492 fail_unless (gst_uri_handler_set_uri (GST_URI_HANDLER (src), |
483 fail_unless (gst_uri_handler_set_uri (GST_URI_HANDLER (src), |
493 "file:///foo/bar")); |
484 "file:///foo/bar")); |
494 |
485 |
495 |
486 |
496 location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (src)); |
487 location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (src)); |
497 fail_unless_equals_string (location, "file://%5Cfoo%5Cbar"); |
488 fail_unless_equals_string (location, "file://%2Ffoo%2Fbar"); |
498 |
489 |
499 |
490 |
500 g_object_get (G_OBJECT (src), "location", &location, NULL); |
491 g_object_get (G_OBJECT (src), "location", &location, NULL); |
501 fail_unless_equals_string (location, "\\foo\\bar"); |
492 fail_unless_equals_string (location, "/foo/bar"); |
502 |
493 |
503 |
494 |
504 g_free (location); |
495 g_free (location); |
505 |
496 |
506 /* should accept file://localhost/foo/bar URIs */ |
497 /* should accept file://localhost/foo/bar URIs */ |
507 fail_unless (gst_uri_handler_set_uri (GST_URI_HANDLER (src), |
498 fail_unless (gst_uri_handler_set_uri (GST_URI_HANDLER (src), |
508 "file://localhost/foo/baz")); |
499 "file://localhost/foo/baz")); |
509 |
500 |
510 |
501 |
511 location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (src)); |
502 location = (gchar *) gst_uri_handler_get_uri (GST_URI_HANDLER (src)); |
512 fail_unless_equals_string (location, "file://%5Cfoo%5Cbaz"); |
503 fail_unless_equals_string (location, "file://%2Ffoo%2Fbaz"); |
513 |
504 |
514 |
505 |
515 g_object_get (G_OBJECT (src), "location", &location, NULL); |
506 g_object_get (G_OBJECT (src), "location", &location, NULL); |
516 fail_unless_equals_string (location, "\\foo\\baz"); |
507 fail_unless_equals_string (location, "/foo/baz"); |
517 |
508 |
518 |
509 |
519 g_free (location); |
510 g_free (location); |
520 |
511 |
521 /* should fail with other hostnames */ |
512 /* should fail with other hostnames */ |