micropython/tests/extmod/ure_stack_overflow.py
Paul Sokolovsky 8e0b9f495b tests/extmod: Add test for ure regexes leading to infinite recursion.
These now should be caught properly and lead to RuntimeError instead of
crash.
2017-10-03 00:24:32 +03:00

14 lines
226 B
Python

try:
import ure as re
except ImportError:
try:
import re
except ImportError:
print("SKIP")
raise SystemExit
try:
re.match("(a*)*", "aaa")
except RuntimeError:
print("RuntimeError")