aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-04-24 18:31:36 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-04-24 18:43:54 +0530
commitec9311c41b111110bc52cfbd6ea682c6fb23f77a (patch)
tree0eeb8220e2c307d6c85afceb02bdbac23dcb2065 /test
parent78fde6e3398ff11e5d383a66b28664badeab5180 (diff)
downloadhypervideo-pre-ec9311c41b111110bc52cfbd6ea682c6fb23f77a.tar.lz
hypervideo-pre-ec9311c41b111110bc52cfbd6ea682c6fb23f77a.tar.xz
hypervideo-pre-ec9311c41b111110bc52cfbd6ea682c6fb23f77a.zip
[outtmpl] Support `str.format` syntax inside replacements
Closes #6843
Diffstat (limited to 'test')
-rw-r--r--test/test_YoutubeDL.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py
index 49ae9e2b1..3c26bd7c6 100644
--- a/test/test_YoutubeDL.py
+++ b/test/test_YoutubeDL.py
@@ -822,7 +822,10 @@ class TestYoutubeDL(unittest.TestCase):
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('%(title&\n|)s', '\n')
+ 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():