diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2024-12-23 15:57:25 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-23 15:57:25 +0530 |
commit | 6fc85f617a5850307fd5b258477070e6ee177796 (patch) | |
tree | 0359d4bc12041a3859cc9cbaf0aa409f829cf325 /test/test_YoutubeDL.py | |
parent | d298693b1b266d198e8eeecb90ea17c4a031268f (diff) |
Don't sanitize filename on Unix when `--no-windows-filenames` (#9591)
Closes #4547, Closes #8464
Authored by: pukkandan
Diffstat (limited to 'test/test_YoutubeDL.py')
-rw-r--r-- | test/test_YoutubeDL.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 966d27a49..6b022a7ea 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -761,6 +761,13 @@ class TestYoutubeDL(unittest.TestCase): test('%(width)06d.%%(ext)s', 'NA.%(ext)s') test('%%(width)06d.%(ext)s', '%(width)06d.mp4') + # Sanitization options + test('%(title3)s', (None, 'foo⧸bar⧹test')) + test('%(title5)s', (None, 'aei_A'), restrictfilenames=True) + test('%(title3)s', (None, 'foo_bar_test'), windowsfilenames=False, restrictfilenames=True) + if sys.platform != 'win32': + test('%(title3)s', (None, 'foo⧸bar\\test'), windowsfilenames=False) + # ID sanitization test('%(id)s', '_abcd', info={'id': '_abcd'}) test('%(some_id)s', '_abcd', info={'some_id': '_abcd'}) |