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 ");