mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-22 10:26:30 +00:00
add test for crawling internal dependencies
This commit is contained in:
parent
c0d7d7e313
commit
0717c807c3
1 changed files with 27 additions and 0 deletions
|
@ -139,6 +139,33 @@ codegen = "0.0.1"
|
|||
&CrateDep::External(VersionReq::parse("0.0.1").unwrap()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn package_manifest_with_internal_dependencies() {
|
||||
let manifest = r#"
|
||||
[package]
|
||||
name = "piston"
|
||||
|
||||
[dependencies.pistoncore-input]
|
||||
path = "src/input"
|
||||
version = "0.20.0"
|
||||
|
||||
[dependencies.pistoncore-window]
|
||||
path = "src/window"
|
||||
version = "0.30.0"
|
||||
|
||||
[dependencies.pistoncore-event_loop]
|
||||
path = "src/event_loop"
|
||||
version = "0.35.0"
|
||||
"#;
|
||||
|
||||
let mut crawler = ManifestCrawler::new();
|
||||
let step_output = crawler.step("".into(), manifest.to_string()).unwrap();
|
||||
assert_eq!(step_output.paths_of_interest.len(), 3);
|
||||
assert_eq!(step_output.paths_of_interest[0].as_str(), "src/input");
|
||||
assert_eq!(step_output.paths_of_interest[1].as_str(), "src/window");
|
||||
assert_eq!(step_output.paths_of_interest[2].as_str(), "src/event_loop");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn simple_workspace_manifest() {
|
||||
let manifest = r#"
|
||||
|
|
Loading…
Reference in a new issue