Mercurial > public > mercurial-scm > hg
comparison rust/hg-core/src/filepatterns.rs @ 44834:be6401a25726
rust-regex: add test for verbatim regex syntax
This makes sure it's not modified.
Differential Revision: https://phab.mercurial-scm.org/D8508
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 07 May 2020 23:54:37 +0200 |
parents | 1e9bfeaec9ba |
children | 26114bd6ec60 |
comparison
equal
deleted
inserted
replaced
44833:1e9bfeaec9ba | 44834:be6401a25726 |
---|---|
623 Path::new("") | 623 Path::new("") |
624 )) | 624 )) |
625 .unwrap(), | 625 .unwrap(), |
626 Some(br"(?:.*/)?rust/target(?:/|$)".to_vec()), | 626 Some(br"(?:.*/)?rust/target(?:/|$)".to_vec()), |
627 ); | 627 ); |
628 assert_eq!( | |
629 build_single_regex(&IgnorePattern::new( | |
630 PatternSyntax::Regexp, | |
631 br"rust/target/\d+", | |
632 Path::new("") | |
633 )) | |
634 .unwrap(), | |
635 Some(br"rust/target/\d+".to_vec()), | |
636 ); | |
628 } | 637 } |
629 | 638 |
630 #[test] | 639 #[test] |
631 fn test_build_single_regex_shortcut() { | 640 fn test_build_single_regex_shortcut() { |
632 assert_eq!( | 641 assert_eq!( |