Skip to content

Commit d321d05

Browse files
committed
add test
1 parent fdf46a1 commit d321d05

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

regex_test.v

+6
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ fn test_match_str_iterator() {
2828
}
2929
assert out == ['a', 'b', 'c', 'd', 'e', 'f']
3030
}
31+
32+
fn test_match_possible_zero_length() {
33+
mut re := pcre.new_regex(r'(.)*', 0) or { panic(err) }
34+
m := re.match_str('Vlang', 0, 0) or { panic(err) }
35+
assert m.get_all() == ['g']
36+
}

0 commit comments

Comments
 (0)