Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test for cargo locate-project #7690

Merged
merged 1 commit into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/testsuite/locate_project.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! Tests for the `cargo locate-project` command.

use cargo_test_support::project;

#[cargo_test]
fn simple() {
let p = project().build();
let root_manifest_path = p.root().join("Cargo.toml");

p.cargo("locate-project")
.with_stdout(format!(
r#"{{"root":"{}"}}"#,
root_manifest_path.to_str().unwrap()
))
.run();
}
1 change: 1 addition & 0 deletions tests/testsuite/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ mod install_upgrade;
mod jobserver;
mod list_targets;
mod local_registry;
mod locate_project;
mod lockfile_compat;
mod login;
mod member_errors;
Expand Down