X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=test%2Ftest_utils.py;h=efa73d0f45e17b76647a8e7895a5bd3c62f404b3;hb=dfc80bdd2e4ef3d30f161a93f99f3050537944ab;hp=30738e7cf4e84ad32f895f21eb59dace2f717b7e;hpb=609ff8ca19f1c4c168a81121074b91cc0f0d4c47;p=youtube-dl diff --git a/test/test_utils.py b/test/test_utils.py index 30738e7cf..efa73d0f4 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -98,6 +98,7 @@ from youtube_dl.compat import ( compat_chr, compat_etree_fromstring, compat_getenv, + compat_os_name, compat_setenv, compat_urlparse, compat_parse_qs, @@ -278,6 +279,7 @@ class TestUtil(unittest.TestCase): self.assertEqual(unescapeHTML('/'), '/') self.assertEqual(unescapeHTML('é'), 'é') self.assertEqual(unescapeHTML(''), '') + self.assertEqual(unescapeHTML('&a"'), '&a"') # HTML5 entities self.assertEqual(unescapeHTML('.''), '.\'') @@ -448,7 +450,9 @@ class TestUtil(unittest.TestCase): def test_shell_quote(self): args = ['ffmpeg', '-i', encodeFilename('ñâ¬Ã\'.mp4')] - self.assertEqual(shell_quote(args), """ffmpeg -i 'ñâ¬Ã'"'"'.mp4'""") + self.assertEqual( + shell_quote(args), + """ffmpeg -i 'ñâ¬Ã'"'"'.mp4'""" if compat_os_name != 'nt' else '''ffmpeg -i "ñâ¬Ã'.mp4"''') def test_str_to_int(self): self.assertEqual(str_to_int('123,456'), 123456) @@ -932,7 +936,7 @@ class TestUtil(unittest.TestCase): def test_args_to_str(self): self.assertEqual( args_to_str(['foo', 'ba/r', '-baz', '2 be', '']), - 'foo ba/r -baz \'2 be\' \'\'' + 'foo ba/r -baz \'2 be\' \'\'' if compat_os_name != 'nt' else 'foo ba/r -baz "2 be" ""' ) def test_parse_filesize(self): @@ -1060,7 +1064,7 @@ ffmpeg version 2.4.4 Copyright (c) 2000-2014 the FFmpeg ...'''), '2.4.4')
Ignored, three