]> jfr.im git - yt-dlp.git/blobdiff - test/test_YoutubeDL.py
[outtmpl] Support `str.format` syntax inside replacements
[yt-dlp.git] / test / test_YoutubeDL.py
index 8da1e5e4b27ce4cdbc9e7d6b7d4fc6073ac0c3b2..3c26bd7c65746b7c3ae527ecfd2c0629416539a5 100644 (file)
@@ -822,6 +822,10 @@ def expect_same_infodict(out):
         test('%(title&foo|baz)s.bar', 'baz.bar')
         test('%(x,id&foo|baz)s.bar', 'foo.bar')
         test('%(x,title&foo|baz)s.bar', 'baz.bar')
+        test('%(id&a\nb|)s', ('a\nb', 'a b'))
+        test('%(id&hi {:>10} {}|)s', 'hi       1234 1234')
+        test(R'%(id&{0} {}|)s', 'NA')
+        test(R'%(id&{0.1}|)s', 'NA')
 
         # Laziness
         def gen():