diff options
author | Melody Horn <melody@boringcactus.com> | 2021-03-31 13:16:08 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-03-31 13:16:08 -0600 |
commit | 42bdec6488da15a12f2324526bf81abd389f2b4d (patch) | |
tree | 613e286384e485bb95a11e5b25a609e105f5d3d5 /src/makefile/pattern.rs | |
parent | dc02827184245392d3059bea150814d28d34a7fe (diff) | |
download | makers-42bdec6488da15a12f2324526bf81abd389f2b4d.tar.gz makers-42bdec6488da15a12f2324526bf81abd389f2b4d.zip |
fix the tests oops
Diffstat (limited to 'src/makefile/pattern.rs')
-rw-r--r-- | src/makefile/pattern.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/makefile/pattern.rs b/src/makefile/pattern.rs index 2d5f46c..fbd89a5 100644 --- a/src/makefile/pattern.rs +++ b/src/makefile/pattern.rs @@ -32,12 +32,15 @@ pub(crate) fn r#match<'a>(pattern: &str, text: &'a str) -> anyhow::Result<Option mod test { use super::*; + type R = anyhow::Result<()>; + #[test] - fn pattern_backslashes() { - let test_case = compile_pattern(r"the\%weird\\%pattern\\"); + fn pattern_backslashes() -> R { + let test_case = compile_pattern(r"the\%weird\\%pattern\\")?; assert_eq!(test_case.to_string(), r"the%weird\\(\w*)pattern\\\\"); - let hell = compile_pattern(r"\\\\%"); + let hell = compile_pattern(r"\\\\%")?; assert_eq!(hell.to_string(), r"\\\\\\(\w*)"); + Ok(()) } } |