mirror of
https://github.com/rust-lang/cargo
synced 2024-08-27 11:19:23 +00:00
Auto merge of #7690 - giraffate:add_test_for_cargo_locate_project, r=alexcrichton
Add a test for `cargo locate-project` There seems to be no test for `cargo locate-project`, so I add the simple test case for this command.
This commit is contained in:
commit
a4cc2736ee
16
tests/testsuite/locate_project.rs
Normal file
16
tests/testsuite/locate_project.rs
Normal file
|
@ -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();
|
||||
}
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue