| --- a/Lib/test/test_cmd_line.py Thu Jun 23 21:26:48 2011 -0400 |
| +++ b/Lib/test/test_cmd_line.py Fri Jun 24 18:15:30 2011 +0200 |
| @@ -259,6 +259,13 @@ |
| "print(repr(input()))", |
| b"'abc'") |
| + def test_unmached_quote(self): |
| + # Issue #10206: python program starting with unmatched quote |
| + # spews 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) |