Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
55278dcc
Commit
55278dcc
authored
Mar 10, 2015
by
Damien George
Browse files
tests: Add test for modure when regex has errors.
parent
8dead2a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/extmod/ure_error.py
0 → 100644
View file @
55278dcc
# test errors in regex
try
:
import
ure
as
re
except
:
import
re
def
test_re
(
r
):
try
:
re
.
compile
(
r
)
print
(
"OK"
)
except
:
# uPy and CPy use different errors, so just ignore the type
print
(
"Error"
)
test_re
(
r
'?'
)
test_re
(
r
'*'
)
test_re
(
r
'+'
)
test_re
(
r
')'
)
test_re
(
r
'['
)
test_re
(
r
'(['
)
test_re
(
r
'([)'
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment