forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#7690 - giraffate:add_test_for_cargo_locate_pr…
…oject, 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.
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters