Commit a7ffa972 authored by Damien George's avatar Damien George
Browse files

tests: Add tests for non-compliant behaviour of lexer.

parent 558a016e
# lexer tests for things that are not implemented, or have non-compliant behaviour
# uPy requires spaces between literal numbers and keywords, CPy doesn't
try:
eval('1and 0')
except SyntaxError:
print('SyntaxError')
try:
eval('1or 0')
except SyntaxError:
print('SyntaxError')
try:
eval('1if 1else 0')
except SyntaxError:
print('SyntaxError')
try:
eval('1if 0else 0')
except SyntaxError:
print('SyntaxError')
SyntaxError
SyntaxError
SyntaxError
SyntaxError
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment