From 98dd126e9818309e4ec9b561e7b6b9f7fa039cb9 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 5 Oct 2017 11:32:55 +1100 Subject: [PATCH] tests/extmod: Add test for '-' in character class in regex. --- tests/extmod/ure1.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/extmod/ure1.py b/tests/extmod/ure1.py index 6075990fcb..54471ed4f9 100644 --- a/tests/extmod/ure1.py +++ b/tests/extmod/ure1.py @@ -48,7 +48,12 @@ m = r.match("d") print(m.group(0)) m = r.match("A") print(m.group(0)) +print("===") +# '-' character within character class block +print(re.match("[-a]+", "-a]d").group(0)) +print(re.match("[a-]+", "-a]d").group(0)) +print("===") r = re.compile("o+") m = r.search("foobar")