X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/54477c858fa2504360964e675faf953d78ac57e6..bc5059672e222ec4df4fe3983c399c0d0fca84d5:/test/test_utils.py?ds=sidebyside diff --git a/test/test_utils.py b/test/test_utils.py index f3fbff0..e9e590e 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -24,6 +24,8 @@ from youtube_dl.utils import ( xpath_with_ns, smuggle_url, unsmuggle_url, + shell_quote, + encodeFilename, ) if sys.version_info < (3, 0): @@ -170,6 +172,10 @@ class TestUtil(unittest.TestCase): self.assertEqual(res_url, url) self.assertEqual(res_data, None) + def test_shell_quote(self): + args = ['ffmpeg', '-i', encodeFilename(u'ñ€ß\'.mp4')] + self.assertEqual(shell_quote(args), u"""ffmpeg -i 'ñ€ß'"'"'.mp4'""") + if __name__ == '__main__': unittest.main()