Skip to content

Commit

Permalink
test checking full stderr output, with new message, resulting from a …
Browse files Browse the repository at this point in the history
…"did you mean"
  • Loading branch information
akabinds committed Aug 3, 2022
1 parent 8f5f2ed commit 222d90b
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions tests/testsuite/cargo_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,27 @@ fn closed_output_ok() {
fn subcommand_leading_plus_output_contains() {
cargo_process("+nightly")
.with_status(101)
.with_stderr_contains(
.with_stderr(
"\
<tab>Cargo does not handle `+toolchain` directives.",
error: no such subcommand: `+nightly`
<tab>Cargo does not handle `+toolchain` directives.
<tab>Did you mean to invoke `cargo` through `rustup` instead?",
)
.run();
}

#[cargo_test]
fn full_did_you_mean() {
cargo_process("bluid")
.with_status(101)
.with_stderr(
"\
error: no such subcommand: `bluid`
<tab>Did you mean `build`?
<tab>View all installed commands with `cargo --list`",
)
.run();
}

0 comments on commit 222d90b

Please sign in to comment.