diff --git a/rust/hg-core/src/filepatterns.rs b/rust/hg-core/src/filepatterns.rs --- a/rust/hg-core/src/filepatterns.rs +++ b/rust/hg-core/src/filepatterns.rs @@ -625,6 +625,15 @@ .unwrap(), Some(br"(?:.*/)?rust/target(?:/|$)".to_vec()), ); + assert_eq!( + build_single_regex(&IgnorePattern::new( + PatternSyntax::Regexp, + br"rust/target/\d+", + Path::new("") + )) + .unwrap(), + br"rust/target/\d+".to_vec(), + ); } #[test]