Skip to content
Snippets Groups Projects
Commit a7ffa972 authored by Damien George's avatar Damien George
Browse files

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

parent 558a016e
No related branches found
No related tags found
No related merge requests found
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment