]> granicus.if.org Git - python/commitdiff
#10206: add test for previously fixed bug.
authorR David Murray <rdmurray@bitdance.com>
Fri, 24 Jun 2011 17:26:31 +0000 (13:26 -0400)
committerR David Murray <rdmurray@bitdance.com>
Fri, 24 Jun 2011 17:26:31 +0000 (13:26 -0400)
Patch by Francisco Martín Brugué.

Lib/test/test_cmd_line.py
Misc/ACKS

index c4e3adfb534d209c136c0569b2d6a7457899aa43..56a8e396590665ca764fea78ef639043f38ba68c 100644 (file)
@@ -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)
index d578c483f136a2a06c4a6781409edeec2b2b36e6..06853b9535c24454db3ed35dade23cb6d2ee52b1 100644 (file)
--- 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