tests: mountpoints: add more checks for mount point path matching
authorTim-Philipp Müller <tim@centricular.com>
Thu, 25 Jan 2018 12:06:57 +0000 (12:06 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 25 Jan 2018 12:13:20 +0000 (12:13 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=771555

tests/check/gst/mountpoints.c

index 31a223e..6a35bd2 100644 (file)
@@ -69,6 +69,9 @@ static const gchar *paths[] = {
   "/tark/bar/baz",
   "/tark/bar/baz/t",
   "/boozop",
+  "/raw",
+  "/raw/video",
+  "/raw/snapshot",
 };
 
 GST_START_TEST (test_match)
@@ -124,6 +127,14 @@ GST_START_TEST (test_match)
   fail_unless (tmp == f[4]);
   fail_unless (matched == 13);
   g_object_unref (tmp);
+  tmp = gst_rtsp_mount_points_match (mounts, "/raw/video", &matched);
+  fail_unless (tmp == f[8]);
+  fail_unless (matched == 10);
+  g_object_unref (tmp);
+  tmp = gst_rtsp_mount_points_match (mounts, "/raw/snapshot", &matched);
+  fail_unless (tmp == f[9]);
+  fail_unless (matched == 13);
+  g_object_unref (tmp);
 
   g_object_unref (mounts);
 }