@@ -29,7 +29,7 @@ var grammarTestData = []struct {
2929 {"b'abc' b'''123'''" , "eval" , "Expression(body=Bytes(s=b'abc123'))" , nil , "" },
3030 {"1234" , "eval" , "Expression(body=Num(n=1234))" , nil , "" },
3131 {"01234" , "eval" , "" , py .SyntaxError , "illegal decimal with leading zero" },
32- {"1234d" , "eval" , "" , py .SyntaxError , "unexpected EOF while parsing " },
32+ {"1234d" , "eval" , "" , py .SyntaxError , "invalid syntax " },
3333 {"1234d" , "exec" , "" , py .SyntaxError , "invalid syntax" },
3434 {"1234d" , "single" , "" , py .SyntaxError , "unexpected EOF while parsing" },
3535 {"0x1234" , "eval" , "Expression(body=Num(n=4660))" , nil , "" },
@@ -317,4 +317,10 @@ var grammarTestData = []struct {
317317 {"pass\n " , "single" , "Interactive(body=[Pass()])" , nil , "" },
318318 {"if True:\n pass\n \n " , "single" , "Interactive(body=[If(test=NameConstant(value=True), body=[Pass()], orelse=[])])" , nil , "" },
319319 {"while True:\n pass\n else:\n return\n " , "single" , "Interactive(body=[While(test=NameConstant(value=True), body=[Pass()], orelse=[Return(value=None)])])" , nil , "" },
320+ {"a='potato" , "eval" , "" , py .SyntaxError , "invalid syntax" },
321+ {"a='potato" , "exec" , "" , py .SyntaxError , "EOL while scanning string literal" },
322+ {"a='potato" , "single" , "" , py .SyntaxError , "EOL while scanning string literal" },
323+ {"a='''potato" , "eval" , "" , py .SyntaxError , "invalid syntax" },
324+ {"a='''potato" , "exec" , "" , py .SyntaxError , "EOF while scanning triple-quoted string literal" },
325+ {"a='''potato" , "single" , "" , py .SyntaxError , "EOF while scanning triple-quoted string literal" },
320326}
0 commit comments