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 @@ -629,6 +629,15 @@ .unwrap(), 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]