aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2012-10-29 08:19:54 +0100
committerPhilipp Hagemeister <[email protected]>2012-10-29 08:19:54 +0100
commit156a59e7a95895e0c710d18acc86cf2c4ab24f4e (patch)
tree50fd4ed8dd50bca7afbbac31c237d42578768812
parentaeca861f227abd282e1ee57b13d1bcba28fe40db (diff)
downloadyoutube-dl-156a59e7a95895e0c710d18acc86cf2c4ab24f4e.tar.gz
youtube-dl-156a59e7a95895e0c710d18acc86cf2c4ab24f4e.zip
Additional tests in file name sanitation
-rw-r--r--test/test_utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index 878840120..e7c6d5b3d 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -33,6 +33,9 @@ class TestUtil(unittest.TestCase):
self.assertEqual(sanitize_filename(u'ä'), u'ä')
self.assertEqual(sanitize_filename(u'кириллица'), u'кириллица')
+ for forbidden in u'"\0\\/':
+ self.assertTrue(forbidden not in sanitize_filename(forbidden))
+
def test_ordered_set(self):
self.assertEqual(orderedSet([1,1,2,3,4,4,5,6,7,3,5]), [1,2,3,4,5,6,7])
self.assertEqual(orderedSet([]), [])