diff --git a/src/info/deps/mod.rs b/src/info/deps/mod.rs index fff6ad1db..287fe0f65 100644 --- a/src/info/deps/mod.rs +++ b/src/info/deps/mod.rs @@ -48,3 +48,19 @@ impl DependencyDetector { Ok(output) } } + +#[cfg(test)] +mod test { + use super::*; + use regex::Regex; + + #[test] + fn test_get_dependencies() -> Result<()> { + let dependency_detector = DependencyDetector::new(); + let deps = dependency_detector.get_dependencies(Path::new("."))?; + let re = Regex::new(r"^\d+ \(cargo\)$")?; + assert!(re.is_match(&deps)); + + Ok(()) + } +}