mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
Fix for bug #1634343: allow specifying empty arguments on Windows
This commit is contained in:
parent
2be9d43c18
commit
10514a70ac
2 changed files with 3 additions and 1 deletions
|
@ -499,7 +499,7 @@ def list2cmdline(seq):
|
||||||
if result:
|
if result:
|
||||||
result.append(' ')
|
result.append(' ')
|
||||||
|
|
||||||
needquote = (" " in arg) or ("\t" in arg)
|
needquote = (" " in arg) or ("\t" in arg) or arg == ""
|
||||||
if needquote:
|
if needquote:
|
||||||
result.append('"')
|
result.append('"')
|
||||||
|
|
||||||
|
|
|
@ -430,6 +430,8 @@ class ProcessTestCase(unittest.TestCase):
|
||||||
'"a\\\\b c" d e')
|
'"a\\\\b c" d e')
|
||||||
self.assertEqual(subprocess.list2cmdline(['a\\\\b\\ c', 'd', 'e']),
|
self.assertEqual(subprocess.list2cmdline(['a\\\\b\\ c', 'd', 'e']),
|
||||||
'"a\\\\b\\ c" d e')
|
'"a\\\\b\\ c" d e')
|
||||||
|
self.assertEqual(subprocess.list2cmdline(['ab', '']),
|
||||||
|
'ab ""')
|
||||||
|
|
||||||
|
|
||||||
def test_poll(self):
|
def test_poll(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue