From 9694f256df7e01972e5e83a46ec4ce2b7b17d3a7 Mon Sep 17 00:00:00 2001 From: fulara Date: Thu, 7 Sep 2017 13:34:55 -0700 Subject: [PATCH] tests: added test for demoing capture names See also: #399 --- tests/replace.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/replace.rs b/tests/replace.rs index 6e555b93ea..28b9df927e 100644 --- a/tests/replace.rs +++ b/tests/replace.rs @@ -39,3 +39,6 @@ replace!(match_at_start_replace_with_empty, replace_all, r"foo", "foobar", t!("" // See https://github.com/rust-lang/regex/issues/393 replace!(single_empty_match, replace, r"^", "bar", t!("foo"), "foobar"); + +// See https://github.com/rust-lang/regex/issues/399 +replace!(capture_longest_possible_name, replace_all, r"(.)", "b", t!("${1}a $1a"), "ba ");