diff options
author | Antonio Ospite <antonio.ospite@collabora.com> | 2019-05-06 13:23:22 +0200 |
---|---|---|
committer | Antonio Ospite <antonio.ospite@collabora.com> | 2019-05-06 13:28:02 +0200 |
commit | f8bed33d4bf1fea7b5b2731b1802eb75fe84744d (patch) | |
tree | f6de0ec3a2553d0c2c71b98ebc7f5ea529b6d82b | |
parent | 1c454fdafc54935f45ddcb9d758a634d152ff026 (diff) |
test: add subparse test for SRT subtitles with no newline at the end
Add a test to verify that SRT subtitles work even if the last chunk does
not have an empty line after it.
-rw-r--r-- | tests/check/elements/subparse.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/check/elements/subparse.c b/tests/check/elements/subparse.c index a414a2a1c..e6c75e0dd 100644 --- a/tests/check/elements/subparse.c +++ b/tests/check/elements/subparse.c @@ -194,6 +194,14 @@ static SubParseInputChunk srt_input5[] = { , }; +/* Test with no newline at the end */ +static SubParseInputChunk srt_input6[] = { + { + "1\n00:00:01,000 --> 00:00:02,000\nLast cue, no newline at the end", + 1 * GST_SECOND, 2 * GST_SECOND, "Last cue, no newline at the end"} + , +}; + static void setup_subparse (void) @@ -390,6 +398,9 @@ GST_START_TEST (test_srt) /* try with some broken/cut-off timestamp */ test_srt_do_test (srt_input5, 0, G_N_ELEMENTS (srt_input5)); + + /* try without an empty line at the end */ + test_srt_do_test (srt_input6, 0, G_N_ELEMENTS (srt_input6)); } GST_END_TEST; |