X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=test%2Ftest_utils.py;h=4cd8188506ad296a407622b759d0ccf89c3c7117;hb=064fafe932c499c43416485c6a1fa0cc0422f818;hp=aa4569b819e368381a9ee100a6060e38ae0ce065;hpb=a426ef6d783038e570db252a2e9e72800ffcb381;p=youtube-dl diff --git a/test/test_utils.py b/test/test_utils.py index aa4569b81..4cd818850 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -1069,6 +1069,47 @@ The first line ''' self.assertEqual(dfxp2srt(dfxp_data_no_default_namespace), srt_data) + dfxp_data_with_style = ''' + + + + + + + + + + + + default stylecustom style + part 1part 2 + line 3part 3 + inner style + + +''' + srt_data = '''1 +00:00:02,080 --> 00:00:05,839 +default stylecustom style + +2 +00:00:02,080 --> 00:00:05,839 +part 1 +part 2 + +3 +00:00:05,839 --> 00:00:09,560 +line 3 +part 3 + +4 +00:00:09,560 --> 00:00:12,359 +inner + style + +''' + self.assertEqual(dfxp2srt(dfxp_data_with_style), srt_data) + def test_cli_option(self): self.assertEqual(cli_option({'proxy': '127.0.0.1:3128'}, '--proxy', 'proxy'), ['--proxy', '127.0.0.1:3128']) self.assertEqual(cli_option({'proxy': None}, '--proxy', 'proxy'), [])
default stylecustom style
part 1part 2
line 3part 3
inner style