diff options
author | PilzAdam <PilzAdam@minetest.net> | 2021-12-17 21:35:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-18 02:05:48 +0530 |
commit | e978789f0f0bfe1963f4a295f6094dafa7524933 (patch) | |
tree | 23311f3696103c6e5a1f0eaaaf15d8d929a1d989 /test/test_YoutubeDL.py | |
parent | ec2e44fc5752ca15fb7ce2e31994453226507f8b (diff) | |
download | hypervideo-pre-e978789f0f0bfe1963f4a295f6094dafa7524933.tar.lz hypervideo-pre-e978789f0f0bfe1963f4a295f6094dafa7524933.tar.xz hypervideo-pre-e978789f0f0bfe1963f4a295f6094dafa7524933.zip |
[outtmpl] Add operator `&` for replacement text (#2012)
Authored by: PilzAdam
Diffstat (limited to 'test/test_YoutubeDL.py')
-rw-r--r-- | test/test_YoutubeDL.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 63ef50e1a..6c2530046 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -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({}), '') |