From 221f88d1f3f67640e72912ad8473782360b0e306 Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Thu, 26 Jan 2017 23:45:51 +1100
Subject: [PATCH] tests/extmod: Add test for ure debug printing when compiling
 a regex.

---
 tests/extmod/ure_debug.py     |  3 +++
 tests/extmod/ure_debug.py.exp | 15 +++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 tests/extmod/ure_debug.py
 create mode 100644 tests/extmod/ure_debug.py.exp

diff --git a/tests/extmod/ure_debug.py b/tests/extmod/ure_debug.py
new file mode 100644
index 000000000..303e1789c
--- /dev/null
+++ b/tests/extmod/ure_debug.py
@@ -0,0 +1,3 @@
+# test printing debugging info when compiling
+import ure
+ure.compile('^a|b[0-9]\w$', ure.DEBUG)
diff --git a/tests/extmod/ure_debug.py.exp b/tests/extmod/ure_debug.py.exp
new file mode 100644
index 000000000..45f5e20f6
--- /dev/null
+++ b/tests/extmod/ure_debug.py.exp
@@ -0,0 +1,15 @@
+ 0: rsplit 5 (3)
+ 2: any
+ 3: jmp 0 (-5)
+ 5: save 0
+ 7: split 14 (5)
+ 9: assert bol
+10: char a
+12: jmp 23 (9)
+14: char b
+16: class 1 0x30-0x39
+20: namedclass w
+22: assert eol
+23: save 1
+25: match
+Bytes: 26, insts: 14
-- 
GitLab