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

Function empty_match_captures_iter

regex/tests/api.rs:60–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58
59#[test]
60fn empty_match_captures_iter() {
61 let re = regex!(r".*?");
62 let ms: Vec<_> = re.captures_iter(text!("abc"))
63 .map(|c| c.get(0).unwrap())
64 .map(|m| (m.start(), m.end()))
65 .collect();
66 assert_eq!(ms, vec![(0, 0), (1, 1), (2, 2), (3, 3)]);
67}
68
69#[test]
70fn capture_names() {

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