Skip to content

Commit 222d90b

Browse files
author
akabinds
committed
test checking full stderr output, with new message, resulting from a "did you mean"
1 parent 8f5f2ed commit 222d90b

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

tests/testsuite/cargo_command.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,27 @@ fn closed_output_ok() {
391391
fn subcommand_leading_plus_output_contains() {
392392
cargo_process("+nightly")
393393
.with_status(101)
394-
.with_stderr_contains(
394+
.with_stderr(
395395
"\
396-
<tab>Cargo does not handle `+toolchain` directives.",
396+
error: no such subcommand: `+nightly`
397+
398+
<tab>Cargo does not handle `+toolchain` directives.
399+
<tab>Did you mean to invoke `cargo` through `rustup` instead?",
400+
)
401+
.run();
402+
}
403+
404+
#[cargo_test]
405+
fn full_did_you_mean() {
406+
cargo_process("bluid")
407+
.with_status(101)
408+
.with_stderr(
409+
"\
410+
error: no such subcommand: `bluid`
411+
412+
<tab>Did you mean `build`?
413+
414+
<tab>View all installed commands with `cargo --list`",
397415
)
398416
.run();
399417
}

0 commit comments

Comments
 (0)