diff --git a/tests/testsuite/locate_project.rs b/tests/testsuite/locate_project.rs new file mode 100644 index 00000000000..17712a69c24 --- /dev/null +++ b/tests/testsuite/locate_project.rs @@ -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(); +} diff --git a/tests/testsuite/main.rs b/tests/testsuite/main.rs index 9c22bbdc29d..6b766e38dbb 100644 --- a/tests/testsuite/main.rs +++ b/tests/testsuite/main.rs @@ -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;