From e697e3750f1273df0968193eea167c83a60f4c84 Mon Sep 17 00:00:00 2001
From: R David Murray <rdmurray@bitdance.com>
Date: Fri, 24 Jun 2011 13:26:31 -0400
Subject: #10206: add test for previously fixed bug.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Patch by Francisco Martín Brugué.
---
 Lib/test/test_cmd_line.py | 7 +++++++
 Misc/ACKS                 | 1 +
 2 files changed, 8 insertions(+)

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)
diff --git a/Misc/ACKS b/Misc/ACKS
index d578c48..06853b9 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -122,6 +122,7 @@ Jean Brouwers
 Gary S. Brown
 Oleg Broytmann
 Dave Brueck
+Francisco Martín Brugué
 Stan Bubrouski
 Erik de Bueger
 Dick Bulterman
-- 
cgit v0.12

