()
| 84 | |
| 85 | #[test] |
| 86 | fn 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] |