Skip to content

Commit 221f88d

Browse files
committed
tests/extmod: Add test for ure debug printing when compiling a regex.
1 parent e9cb1f8 commit 221f88d

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

tests/extmod/ure_debug.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# test printing debugging info when compiling
2+
import ure
3+
ure.compile('^a|b[0-9]\w$', ure.DEBUG)

tests/extmod/ure_debug.py.exp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
0: rsplit 5 (3)
2+
2: any
3+
3: jmp 0 (-5)
4+
5: save 0
5+
7: split 14 (5)
6+
9: assert bol
7+
10: char a
8+
12: jmp 23 (9)
9+
14: char b
10+
16: class 1 0x30-0x39
11+
20: namedclass w
12+
22: assert eol
13+
23: save 1
14+
25: match
15+
Bytes: 26, insts: 14

0 commit comments

Comments
 (0)