We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dead2a commit 55278dcCopy full SHA for 55278dc
1 file changed
tests/extmod/ure_error.py
@@ -0,0 +1,21 @@
1
+# test errors in regex
2
+
3
+try:
4
+ import ure as re
5
+except:
6
+ import re
7
8
+def test_re(r):
9
+ try:
10
+ re.compile(r)
11
+ print("OK")
12
+ except: # uPy and CPy use different errors, so just ignore the type
13
+ print("Error")
14
15
+test_re(r'?')
16
+test_re(r'*')
17
+test_re(r'+')
18
+test_re(r')')
19
+test_re(r'[')
20
+test_re(r'([')
21
+test_re(r'([)')
0 commit comments