aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/pattern.rs
diff options
context:
space:
mode:
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(())
}
}