blob: 38eb79b1c8c5bca88f99ccf2da219360152f1a72 [file] [log] [blame]
Jeremy Hylton3c0d0132000-06-20 19:13:27 +00001REPS = 8192
2
3try:
4 eval("2+2+" * REPS + "+3.14159265")
5except SyntaxError, msg:
6 print "Caught SyntaxError for long expression:", msg
7else:
8 print "Long expression did not raise SyntaxError"
9
10## This test prints "s_push: parser stack overflow" on stderr,
11 ## which seems to confuse the test harness
12##try:
13## eval("(2+" * REPS + "0" + ")" * REPS)
14##except SyntaxError:
15## pass
16##else:
17## print "Deeply nested expression did not raised SyntaxError"
18