summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_cmd_line.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index 57508c7530..9738691693 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -259,6 +259,13 @@ class CmdLineTest(unittest.TestCase):
"print(repr(input()))",
b"'abc'")
+ def test_unmached_quote(self):
+ # Issue #10206: python program starting with unmatched quote
+ # spewed spaces to stdout
+ rc, out, err = assert_python_failure('-c', "'")
+ self.assertRegex(err.decode('ascii', 'ignore'), 'SyntaxError')
+ self.assertEqual(b'', out)
+
def test_main():
test.support.run_unittest(CmdLineTest)