]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Additional tests in file name sanitation
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 29 Oct 2012 07:19:54 +0000 (08:19 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 29 Oct 2012 07:19:54 +0000 (08:19 +0100)
test/test_utils.py

index 87884012040bd71f33cc6274ad7423a6c635c2d7..e7c6d5b3d73342cf3b5544f287d358e32b9dde9d 100644 (file)
@@ -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([]), [])