Skip to content

Commit 42933db

Browse files
committed
test(term): progress = "never" is invalid
This was claimed supported in #8165 (comment) but actually it never is. Tested with 1.50 Cargo and it failed with the same reason. It never worked because our custom `Deserializer::deserialize_option` never called `visit_str`. See https://github.com/rust-lang/cargo/blob/c369b8c8d85a/src/cargo/util/config/de.rs#L135-L145
1 parent a7f0cc4 commit 42933db

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/testsuite/progress.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,26 @@ fn never_progress() {
156156
.with_stderr_does_not_contain("[BUILDING] [..] [..]/4: [..]")
157157
.run();
158158
}
159+
160+
#[cargo_test]
161+
fn plain_string_when_doesnt_work() {
162+
let p = project()
163+
.file(
164+
".cargo/config.toml",
165+
r#"
166+
[term]
167+
progress = "never"
168+
"#,
169+
)
170+
.file("src/lib.rs", "")
171+
.build();
172+
173+
p.cargo("check")
174+
.with_status(101)
175+
.with_stderr_data(str![[r#"
176+
[ERROR] invalid configuration for key `term.progress`
177+
expected a table, but found a string for `term.progress` in [ROOT]/foo/.cargo/config.toml
178+
179+
"#]])
180+
.run();
181+
}

0 commit comments

Comments
 (0)