You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
595 B

# parser tests
try:
compile
except NameError:
print("SKIP")
import sys
sys.exit()
# completely empty string
# uPy and CPy differ for this case
#try:
# compile("", "stdin", "single")
#except SyntaxError:
# print("SyntaxError")
try:
compile("", "stdin", "eval")
except SyntaxError:
print("SyntaxError")
compile("", "stdin", "exec")
# empty continued line
try:
compile("\\\n", "stdin", "single")
except SyntaxError:
print("SyntaxError")
try:
compile("\\\n", "stdin", "eval")
except SyntaxError:
print("SyntaxError")
compile("\\\n", "stdin", "exec")