Skip to content

Commit e3d9b05

Browse files
committed
Tweak shlex.quote tests based on picnixz's review
Add test to ensure string with single quote inside it (without which the string wouldn't need quoting) is quoted even though `force=False`.
1 parent cd5d9c2 commit e3d9b05

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/test/test_shlex.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ def testForceQuote(self):
348348
self.assertEqual(shlex.quote("spam", force=True), "'spam'")
349349
self.assertEqual(shlex.quote("spam eggs", force=False), "'spam eggs'")
350350
self.assertEqual(shlex.quote("spam eggs", force=True), "'spam eggs'")
351+
self.assertEqual(shlex.quote("two's-complement", force=False), "'two'\"'\"'s-complement'")
351352

352353
def testJoin(self):
353354
for split_command, command in [

0 commit comments

Comments
 (0)