From 9de472f6ea1c369a89df675a5fcfdedbdc334954 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 1 Apr 2024 15:10:11 +0530 Subject: [PATCH] Add tests --- test/test_YoutubeDL.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 5242cf88f..6ec08999b 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -707,6 +707,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'})