tests/extmod: Add test for '-' in character class in regex.

This commit is contained in:
Damien George 2017-10-05 11:32:55 +11:00
parent 8c7db42ee3
commit 98dd126e98

View File

@ -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")