mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Update old tests
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
abb463a7aa
commit
99b3564d0d
@ -1041,7 +1041,14 @@ fn cargo_compile_with_filename() {
|
||||
|
||||
p.cargo("build --bin bin.rs")
|
||||
.with_status(101)
|
||||
.with_stderr("[ERROR] no bin target named `bin.rs`")
|
||||
.with_stderr(
|
||||
"\
|
||||
[ERROR] no bin target named `bin.rs`.
|
||||
Available bin targets:
|
||||
a
|
||||
|
||||
",
|
||||
)
|
||||
.run();
|
||||
|
||||
p.cargo("build --bin a.rs")
|
||||
@ -1056,7 +1063,14 @@ fn cargo_compile_with_filename() {
|
||||
|
||||
p.cargo("build --example example.rs")
|
||||
.with_status(101)
|
||||
.with_stderr("[ERROR] no example target named `example.rs`")
|
||||
.with_stderr(
|
||||
"\
|
||||
[ERROR] no example target named `example.rs`.
|
||||
Available example targets:
|
||||
a
|
||||
|
||||
",
|
||||
)
|
||||
.run();
|
||||
|
||||
p.cargo("build --example a.rs")
|
||||
|
@ -503,7 +503,10 @@ automatically infer them to be a target, such as in subfolders.
|
||||
|
||||
For more information on this warning you can consult
|
||||
https://github.com/rust-lang/cargo/issues/5330
|
||||
error: no example target named `a`
|
||||
error: no example target named `a`.
|
||||
Available example targets:
|
||||
do_magic
|
||||
|
||||
",
|
||||
)
|
||||
.run();
|
||||
@ -528,7 +531,14 @@ fn run_example_autodiscover_2015_with_autoexamples_disabled() {
|
||||
let p = autodiscover_examples_project("2015", Some(false));
|
||||
p.cargo("run --example a")
|
||||
.with_status(101)
|
||||
.with_stderr("error: no example target named `a`\n")
|
||||
.with_stderr(
|
||||
"\
|
||||
error: no example target named `a`.
|
||||
Available example targets:
|
||||
do_magic
|
||||
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
@ -600,7 +610,14 @@ fn run_with_filename() {
|
||||
|
||||
p.cargo("run --bin bin.rs")
|
||||
.with_status(101)
|
||||
.with_stderr("[ERROR] no bin target named `bin.rs`")
|
||||
.with_stderr(
|
||||
"\
|
||||
[ERROR] no bin target named `bin.rs`.
|
||||
Available bin targets:
|
||||
a
|
||||
|
||||
",
|
||||
)
|
||||
.run();
|
||||
|
||||
p.cargo("run --bin a.rs")
|
||||
@ -615,7 +632,14 @@ fn run_with_filename() {
|
||||
|
||||
p.cargo("run --example example.rs")
|
||||
.with_status(101)
|
||||
.with_stderr("[ERROR] no example target named `example.rs`")
|
||||
.with_stderr(
|
||||
"\
|
||||
[ERROR] no example target named `example.rs`.
|
||||
Available example targets:
|
||||
a
|
||||
|
||||
",
|
||||
)
|
||||
.run();
|
||||
|
||||
p.cargo("run --example a.rs")
|
||||
|
@ -2122,11 +2122,21 @@ fn bad_example() {
|
||||
|
||||
p.cargo("run --example foo")
|
||||
.with_status(101)
|
||||
.with_stderr("[ERROR] no example target named `foo`")
|
||||
.with_stderr(
|
||||
"\
|
||||
[ERROR] no example target named `foo`.
|
||||
|
||||
",
|
||||
)
|
||||
.run();
|
||||
p.cargo("run --bin foo")
|
||||
.with_status(101)
|
||||
.with_stderr("[ERROR] no bin target named `foo`")
|
||||
.with_stderr(
|
||||
"\
|
||||
[ERROR] no bin target named `foo`.
|
||||
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user