aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/pattern.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-31 13:16:08 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-31 13:16:08 -0600
commit42bdec6488da15a12f2324526bf81abd389f2b4d (patch)
tree613e286384e485bb95a11e5b25a609e105f5d3d5 /src/makefile/pattern.rs
parentdc02827184245392d3059bea150814d28d34a7fe (diff)
downloadmakers-42bdec6488da15a12f2324526bf81abd389f2b4d.tar.gz
makers-42bdec6488da15a12f2324526bf81abd389f2b4d.zip
fix the tests oops
Diffstat (limited to 'src/makefile/pattern.rs')
-rw-r--r--src/makefile/pattern.rs9
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(())
}
}