aboutsummaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile/inference_rules.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/makefile/inference_rules.rs b/src/makefile/inference_rules.rs
index 7a636df..86e5598 100644
--- a/src/makefile/inference_rules.rs
+++ b/src/makefile/inference_rules.rs
@@ -77,4 +77,21 @@ mod test {
assert!(rule.matches("dir/foo.o")?);
Ok(())
}
+
+ #[cfg(feature = "full")]
+ #[test]
+ fn percent_match() -> R {
+ // thanks, SPDX License List
+ let rule = InferenceRule {
+ products: vec!["licenseListPublisher-%.jar-valid".to_owned()],
+ prerequisites: vec![
+ "licenseListPublisher-%.jar.asc".to_owned(),
+ "licenseListPublisher-%.jar".to_owned(),
+ "goneall.gpg".to_owned(),
+ ],
+ commands: vec![],
+ };
+ assert!(rule.matches("licenseListPublisher-2.2.1.jar-valid")?);
+ Ok(())
+ }
}