Skip to content

Commit 39572e2

Browse files
committed
Added test for case when cargo config file has jobs argument set to 0
1 parent 90574f0 commit 39572e2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/testsuite/build.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4802,6 +4802,24 @@ fn good_cargo_config_jobs() {
48024802
p.cargo("build -v").run();
48034803
}
48044804

4805+
#[cargo_test]
4806+
fn invalid_cargo_config_jobs() {
4807+
let p = project()
4808+
.file("src/lib.rs", "")
4809+
.file(
4810+
".cargo/config",
4811+
r#"
4812+
[build]
4813+
jobs = 0
4814+
"#,
4815+
)
4816+
.build();
4817+
p.cargo("build -v")
4818+
.with_status(101)
4819+
.with_stderr_contains("error: jobs may not be 0")
4820+
.run();
4821+
}
4822+
48054823
#[cargo_test]
48064824
fn invalid_jobs() {
48074825
let p = project()

0 commit comments

Comments
 (0)