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

Function capture_index

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

Source from the content-addressed store, hash-verified

84
85#[test]
86fn capture_index() {
87 let re = regex!(r"^(?P<name>.+)$");
88 let cap = re.captures(t!("abc")).unwrap();
89 assert_eq!(&cap[0], t!("abc"));
90 assert_eq!(&cap[1], t!("abc"));
91 assert_eq!(&cap["name"], t!("abc"));
92}
93
94#[test]
95#[should_panic]

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.80
capturesMethod · 0.45

Tested by

no test coverage detected