[pypy-svn] r56362 - in pypy/dist/pypy/module/recparser: . test
cfbolz at codespeak.net
cfbolz at codespeak.net
Mon Jul 7 23:31:28 CEST 2008
Author: cfbolz
Date: Mon Jul 7 23:31:27 2008
New Revision: 56362
Modified:
pypy/dist/pypy/module/recparser/pyparser.py
pypy/dist/pypy/module/recparser/test/test_parser.py
Log:
Another parser segfault. I knew why I gave the test method a number :-).
Modified: pypy/dist/pypy/module/recparser/pyparser.py
==============================================================================
--- pypy/dist/pypy/module/recparser/pyparser.py (original)
+++ pypy/dist/pypy/module/recparser/pyparser.py Mon Jul 7 23:31:27 2008
@@ -210,6 +210,7 @@
nodes.append( node )
return SyntaxNode( nodetype, nodes )
else:
+ check_length(space, items, 2)
value = space.str_w( items[1] )
lineno = -1
if len(items)>2:
Modified: pypy/dist/pypy/module/recparser/test/test_parser.py
==============================================================================
--- pypy/dist/pypy/module/recparser/test/test_parser.py (original)
+++ pypy/dist/pypy/module/recparser/test/test_parser.py Mon Jul 7 23:31:27 2008
@@ -28,6 +28,10 @@
import parser
raises(parser.ParserError, parser.sequence2st, ())
+ def test_sequence2st_bug1(self):
+ import parser
+ raises(parser.ParserError, parser.sequence2st, (True,))
+
def test_source2ast_bug1(self):
import parser
raises(SyntaxError, parser.source2ast, "\xDE\xDA")
More information about the Pypy-commit
mailing list