]> jfr.im git - yt-dlp.git/blobdiff - test/test_YoutubeDL.py
[outtmpl] Alternate form for `D` and fix suffix's case
[yt-dlp.git] / test / test_YoutubeDL.py
index 39d7e1ec55f3d656ab8d61a7625babe9f387eec7..d2cc423d6066405e111d60d9fa9076b9f46bb117 100644 (file)
@@ -645,6 +645,7 @@ def test_add_extra_info(self):
         'ext': 'mp4',
         'width': None,
         'height': 1080,
+        'filesize': 1024,
         'title1': '$PATH',
         'title2': '%PATH%',
         'title3': 'foo/bar\\test',
@@ -778,10 +779,11 @@ def expect_same_infodict(out):
         test('%(title5)#U', 'a\u0301e\u0301i\u0301 𝐀')
         test('%(title5)+U', 'áéí A')
         test('%(title5)+#U', 'a\u0301e\u0301i\u0301 A')
-        test('%(height)D', '1K')
-        test('%(height)5.2D', ' 1.08K')
-        test('%(title4).10F', ('foo \'bar\' ', 'foo \'bar\'#'))
-        test('%(title4)#F', 'foo_bar_test')
+        test('%(height)D', '1k')
+        test('%(filesize)#D', '1Ki')
+        test('%(height)5.2D', ' 1.08k')
+        test('%(title4)#S', 'foo_bar_test')
+        test('%(title4).10S', ('foo \'bar\' ', 'foo \'bar\'' + ('#' if compat_os_name == 'nt' else ' ')))
         if compat_os_name == 'nt':
             test('%(title4)q', ('"foo \\"bar\\" test"', "'foo _'bar_' test'"))
             test('%(formats.:.id)#q', ('"id 1" "id 2" "id 3"', "'id 1' 'id 2' 'id 3'"))