[Updated] D8508: rust-regex: add test for verbatim regex syntax

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Thu May 7 23:22:17 UTC 2020


Alphare edited the summary of this revision.
Alphare retitled this revision from "rust-regex: fix support for verbatim `re:` syntax" to "rust-regex: add test for verbatim regex syntax".
Alphare updated this revision to Diff 21326.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8508?vs=21322&id=21326

BRANCH
  stable

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8508/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8508

AFFECTED FILES
  rust/hg-core/src/filepatterns.rs

CHANGE DETAILS

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]



To: Alphare, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200507/f40e16c5/attachment-0002.html>


More information about the Mercurial-patches mailing list