diff options
author | R David Murray <rdmurray@bitdance.com> | 2011-06-24 17:26:31 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2011-06-24 17:26:31 (GMT) |
commit | e697e3750f1273df0968193eea167c83a60f4c84 (patch) | |
tree | 2c05bf1eeb9181f3f67cd57187b5150ff59974b5 /Lib/test/test_cmd_line.py | |
parent | 24eb4bc5c9280f69b06233ef49089158e8e347a7 (diff) | |
download | cpython-e697e3750f1273df0968193eea167c83a60f4c84.zip cpython-e697e3750f1273df0968193eea167c83a60f4c84.tar.gz cpython-e697e3750f1273df0968193eea167c83a60f4c84.tar.bz2 |
#10206: add test for previously fixed bug.
Patch by Francisco Martín Brugué.
Diffstat (limited to 'Lib/test/test_cmd_line.py')
-rw-r--r-- | Lib/test/test_cmd_line.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index c4e3adf..56a8e39 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -265,6 +265,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) |