mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
parent
eb0f9d6838
commit
87ea7dfc04
2 changed files with 5 additions and 1 deletions
|
@ -655,6 +655,7 @@ def test_add_extra_info(self):
|
||||||
'height': 1080,
|
'height': 1080,
|
||||||
'title1': '$PATH',
|
'title1': '$PATH',
|
||||||
'title2': '%PATH%',
|
'title2': '%PATH%',
|
||||||
|
'title3': 'foo/bar\\test',
|
||||||
'timestamp': 1618488000,
|
'timestamp': 1618488000,
|
||||||
'duration': 100000,
|
'duration': 100000,
|
||||||
'playlist_index': 1,
|
'playlist_index': 1,
|
||||||
|
@ -735,6 +736,9 @@ def fname(templ):
|
||||||
self.assertEqual(fname('Hello %(title1)s'), 'Hello $PATH')
|
self.assertEqual(fname('Hello %(title1)s'), 'Hello $PATH')
|
||||||
self.assertEqual(fname('Hello %(title2)s'), 'Hello %PATH%')
|
self.assertEqual(fname('Hello %(title2)s'), 'Hello %PATH%')
|
||||||
|
|
||||||
|
self.assertEqual(fname('%(title3)s'), 'foo_bar_test')
|
||||||
|
self.assertEqual(fname('%(formats.0)s'), "{'id' - 'id1'}")
|
||||||
|
|
||||||
self.assertEqual(fname('%(id)r %(height)r'), "'1234' 1080")
|
self.assertEqual(fname('%(id)r %(height)r'), "'1234' 1080")
|
||||||
self.assertEqual(fname('%(formats.0)r'), "{'id' - 'id1'}")
|
self.assertEqual(fname('%(formats.0)r'), "{'id' - 'id1'}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue