[test_compat] Add test for compat_shlex_split
authorSergey M․ <dstftw@gmail.com>
Sat, 5 Sep 2015 15:41:34 +0000 (21:41 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 5 Sep 2015 15:41:34 +0000 (21:41 +0600)
test/test_compat.py

index c3ba8ad2e3aa1f5cd33dd5a61a184d52cc0c07a9..d41a25e8e5dec02dd7764174c00d1f4be6c47686 100644 (file)
@@ -14,6 +14,7 @@ from youtube_dl.utils import get_filesystem_encoding
 from youtube_dl.compat import (
     compat_getenv,
     compat_expanduser,
+    compat_shlex_split,
     compat_urllib_parse_unquote,
     compat_urllib_parse_unquote_plus,
 )
@@ -67,5 +68,8 @@ class TestCompat(unittest.TestCase):
         self.assertEqual(compat_urllib_parse_unquote_plus('abc%20def'), 'abc def')
         self.assertEqual(compat_urllib_parse_unquote_plus('%7e/abc+def'), '~/abc def')
 
+    def test_compat_shlex(self):
+        self.assertEqual(compat_shlex_split('-option "one two"'), ['-option', 'one two'])
+
 if __name__ == '__main__':
     unittest.main()