MCPcopy Create free account
hub / github.com/davidblewett/rure-python / empty_match_unicode_captures_iter

Function empty_match_unicode_captures_iter

regex/tests/api_str.rs:14–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13#[test]
14fn empty_match_unicode_captures_iter() {
15 // Same as empty_match_unicode_find_iter, but tests capture iteration.
16 let re = regex!(r".*?");
17 let ms: Vec<_> = re.captures_iter(text!("Ⅰ1Ⅱ2"))
18 .map(|c| c.get(0).unwrap())
19 .map(|m| (m.start(), m.end()))
20 .collect();
21 assert_eq!(vec![(0, 0), (3, 3), (4, 4), (7, 7), (8, 8)], ms);
22}
23
24#[test]
25fn match_as_str() {

Callers

nothing calls this directly

Calls 6

mapMethod · 0.80
unwrapMethod · 0.80
captures_iterMethod · 0.45
getMethod · 0.45
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected