Simplify cargo_command::cargo_subcommand_args test

This commit is contained in:
Dale Wijnand 2018-11-18 13:38:33 +00:00
parent 6afca122e5
commit 49f73b9c4e
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF

View File

@ -264,13 +264,8 @@ fn cargo_subcommand_args() {
cargo_process("foo bar -v --help")
.env("PATH", &path)
.with_stdout(
if cfg!(windows) { // weird edge-case w/ CWD & (windows vs unix)
format!(r#"[{:?}, "foo", "bar", "-v", "--help"]"#, cargo_foo_bin)
} else {
r#"["[CWD]/cargo-foo/target/debug/cargo-foo", "foo", "bar", "-v", "--help"]"#.to_string()
}
).run();
.with_stdout(r#"["[CWD]/cargo-foo/target/debug/cargo-foo", "foo", "bar", "-v", "--help"]"#)
.run();
}
#[test]