Skip to content

Commit 476a1f7

Browse files
committed
test(cli): Verify you can't use Cargo.toml
1 parent b81b251 commit 476a1f7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/testsuite/script.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,26 @@ args: []
6565
.run();
6666
}
6767

68+
#[cargo_test]
69+
fn basic_cargo_toml() {
70+
let p = cargo_test_support::project()
71+
.file("src/main.rs", ECHO_SCRIPT)
72+
.build();
73+
74+
p.cargo("-Zscript Cargo.toml")
75+
.masquerade_as_nightly_cargo(&["script"])
76+
.with_status(101)
77+
.with_stdout("")
78+
.with_stderr(
79+
"\
80+
error: no such command: `Cargo.toml`
81+
82+
<tab>View all installed commands with `cargo --list`
83+
",
84+
)
85+
.run();
86+
}
87+
6888
#[cargo_test]
6989
fn path_required() {
7090
let p = cargo_test_support::project()

0 commit comments

Comments
 (0)