Skip to content

Commit 47fec41

Browse files
Josverldpgeorge
authored andcommitted
unix-ffi/re: Add tests for empty string match in ffi regex.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent d8d362e commit 47fec41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

unix-ffi/re/test_re.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@
6060
text = " \thello there\n \t how are you?"
6161
indents = _leading_whitespace_re.findall(text)
6262
assert indents == [" \t", " \t "]
63+
64+
m = re.match(r"(.)?", "")
65+
assert m.group() == ""
66+
assert m.group(0, 1) == ("", None)
67+
assert m.groups() == (None,)
68+
assert m.groups("default") == ("default",)

0 commit comments

Comments
 (0)