mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
tests: add unit test for samiparser issue
https://bugzilla.gnome.org/show_bug.cgi?id=712805
This commit is contained in:
parent
a81b2380cf
commit
60e87090eb
1 changed files with 27 additions and 0 deletions
|
@ -771,6 +771,32 @@ GST_START_TEST (test_sami_bad_entities)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
|
GST_START_TEST (test_sami_comment)
|
||||||
|
{
|
||||||
|
SubParseInputChunk sami_input[] = {
|
||||||
|
{"<SAMI>\n"
|
||||||
|
"<!--\n"
|
||||||
|
"=======\n"
|
||||||
|
"foo bar\n"
|
||||||
|
"=======\n"
|
||||||
|
"-->\n"
|
||||||
|
"<BODY>\n"
|
||||||
|
" <SYNC Start=1000>\n"
|
||||||
|
" <P Class=\"C====\">\n" "   &\n",
|
||||||
|
1000 * GST_MSECOND, 2000 * GST_MSECOND,
|
||||||
|
"\xc2\xa0 &"},
|
||||||
|
{" <SYNC Start=2000>\n"
|
||||||
|
" <P Class=CC>\n"
|
||||||
|
"   ± ´\n" "</BODY>\n" "</SAMI>\n",
|
||||||
|
2000 * GST_MSECOND, GST_CLOCK_TIME_NONE,
|
||||||
|
"\xc2\xa0 \xc2\xb1 \xc2\xb4"}
|
||||||
|
};
|
||||||
|
|
||||||
|
do_test (sami_input, G_N_ELEMENTS (sami_input), "pango-markup");
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_END_TEST;
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* - add/modify tests so that lines aren't dogfed to the parsers in complete
|
* - add/modify tests so that lines aren't dogfed to the parsers in complete
|
||||||
* lines or sets of complete lines, but rather in random chunks
|
* lines or sets of complete lines, but rather in random chunks
|
||||||
|
@ -803,6 +829,7 @@ subparse_suite (void)
|
||||||
tcase_add_test (tc_chain, test_sami_xml_entities);
|
tcase_add_test (tc_chain, test_sami_xml_entities);
|
||||||
tcase_add_test (tc_chain, test_sami_html_entities);
|
tcase_add_test (tc_chain, test_sami_html_entities);
|
||||||
tcase_add_test (tc_chain, test_sami_bad_entities);
|
tcase_add_test (tc_chain, test_sami_bad_entities);
|
||||||
|
tcase_add_test (tc_chain, test_sami_comment);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue