test(cli): Verify directory-manifest behaivor

This commit is contained in:
Ed Page 2023-06-21 11:30:55 -05:00
parent b1394895ad
commit af69746ba6

View File

@ -437,6 +437,26 @@ args: []
.run();
}
#[cargo_test]
fn script_like_dir() {
let p = cargo_test_support::project()
.file("script.rs/foo", "something")
.build();
p.cargo("-Zscript script.rs")
.masquerade_as_nightly_cargo(&["script"])
.with_status(101)
.with_stderr(
"\
[ERROR] failed to read `[ROOT]/foo/script.rs`
Caused by:
Is a directory (os error 21)
",
)
.run();
}
#[cargo_test]
fn test_name_same_as_dependency() {
Package::new("script", "1.0.0").publish();