projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aeca861
)
Additional tests in file name sanitation
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 29 Oct 2012 07:19:54 +0000
(08:19 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 29 Oct 2012 07:19:54 +0000
(08:19 +0100)
test/test_utils.py
patch
|
blob
|
history
diff --git
a/test/test_utils.py
b/test/test_utils.py
index 87884012040bd71f33cc6274ad7423a6c635c2d7..e7c6d5b3d73342cf3b5544f287d358e32b9dde9d 100644
(file)
--- 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([]), [])