subparse: add typefind tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6937>
This commit is contained in:
Guillaume Desmottes 2024-05-27 14:47:48 +02:00
parent e2b1730398
commit f7c8f4bb26
2 changed files with 30 additions and 0 deletions

View file

@ -508,6 +508,19 @@ GST_START_TEST (test_webvtt)
GST_END_TEST;
GST_START_TEST (test_subparse)
{
const gchar *type;
GstCaps *caps = NULL;
caps = typefind_test_file ("subrip.srt");
type = gst_structure_get_name (gst_caps_get_structure (caps, 0));
fail_unless_equals_string (type, "application/x-subtitle");
gst_caps_unref (caps);
}
GST_END_TEST;
static Suite *
typefindfunctions_suite (void)
{
@ -526,6 +539,7 @@ typefindfunctions_suite (void)
tcase_add_test (tc_chain, test_hls_m3u8);
tcase_add_test (tc_chain, test_manifest_typefinding);
tcase_add_test (tc_chain, test_webvtt);
tcase_add_test (tc_chain, test_subparse);
return s;
}

View file

@ -0,0 +1,16 @@
1
00:00:01,000 --> 00:00:02,000
One
2
00:00:02,000 --> 00:00:03,000
Two
3
00:00:03,000 --> 00:00:04,000
Three
4
00:00:04,000 --> 00:00:05,000
Four