carols10cents/cargo-open

Add a test for getting the directory of a crate that is a dependency of a dependency

Open

#6 opened on Oct 4, 2015

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Rust (21 stars) (5 forks)user submission
E-easyhelp wanted

Description

In main.rs, add a unit test for the cargo_dir function that checks that it returns the correct source code directory for a crate that is a dependency of a crate that is a top-level dependency.

For example, clap is one of this project's top-level dependencies, and ansi_term is one of clap's dependencies. So if we run cargo_dir("ansi_term") in the context of this project, we should get the correct source code directory for ansi_term even though it's not in the Cargo.toml file directly.

Contributor guide