mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
test: add a test for error handling in script installation
Signed-off-by: Rustin170506 <techregister@pm.me>
This commit is contained in:
parent
91da8dba0d
commit
9fe45b2010
@ -1408,6 +1408,22 @@ Caused by:
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cargo_test]
|
||||||
|
fn cmd_install_with_embedded() {
|
||||||
|
let p = cargo_test_support::project()
|
||||||
|
.file("script.rs", ECHO_SCRIPT)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
p.cargo("-Zscript install --path script.rs")
|
||||||
|
.masquerade_as_nightly_cargo(&["script"])
|
||||||
|
.with_status(101)
|
||||||
|
.with_stderr_data(str![[r#"
|
||||||
|
[ERROR] `[ROOT]/foo/script.rs` is not a directory. --path must point to a directory containing a Cargo.toml file.
|
||||||
|
|
||||||
|
"#]])
|
||||||
|
.run();
|
||||||
|
}
|
||||||
|
|
||||||
#[cargo_test]
|
#[cargo_test]
|
||||||
fn cmd_package_with_embedded() {
|
fn cmd_package_with_embedded() {
|
||||||
let p = cargo_test_support::project()
|
let p = cargo_test_support::project()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user