mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-06-30 11:02:54 -05:00
[outtmpl] Add operator &
for replacement text (#2012)
Authored by: PilzAdam
This commit is contained in:
@ -836,6 +836,11 @@ class TestYoutubeDL(unittest.TestCase):
|
||||
test('%(title3)s', ('foo/bar\\test', 'foo_bar_test'))
|
||||
test('folder/%(title3)s', ('folder/foo/bar\\test', 'folder%sfoo_bar_test' % os.path.sep))
|
||||
|
||||
# Replacement
|
||||
test('%(id&foo)s.bar', 'foo.bar')
|
||||
test('%(title&foo)s.bar', 'NA.bar')
|
||||
test('%(title&foo|baz)s.bar', 'baz.bar')
|
||||
|
||||
def test_format_note(self):
|
||||
ydl = YoutubeDL()
|
||||
self.assertEqual(ydl._format_note({}), '')
|
||||
|
Reference in New Issue
Block a user