From f84f7a2cece1db25fe539bd66a42ec454b0c008e Mon Sep 17 00:00:00 2001 From: Hosang Lee Date: Thu, 18 Jun 2020 09:01:34 +0900 Subject: [PATCH] tests: subparse: add test for webvtt without hour component Test for webvtt without hour component. mm:ss.000 --- tests/check/elements/subparse.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/check/elements/subparse.c b/tests/check/elements/subparse.c index aa13878..7a7b7a5 100644 --- a/tests/check/elements/subparse.c +++ b/tests/check/elements/subparse.c @@ -489,6 +489,13 @@ GST_START_TEST (test_webvtt) , }; + /* Test with no hour component */ + SubParseInputChunk webvtt_input1[] = { + { + "1\n00:01.000 --> 00:02.000 D:vertical T:50%\nNo hour component\n\n", + 1 * GST_SECOND, 2 * GST_SECOND, "No hour component"} + }; + /* Test with no newline at the end */ SubParseInputChunk webvtt_input2[] = { { @@ -498,6 +505,7 @@ GST_START_TEST (test_webvtt) }; test_vtt_do_test (webvtt_input, 0, G_N_ELEMENTS (webvtt_input)); + test_vtt_do_test (webvtt_input1, 0, G_N_ELEMENTS (webvtt_input1)); test_vtt_do_test (webvtt_input2, 0, G_N_ELEMENTS (webvtt_input2)); } -- 2.7.4