mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
test(rustc): Show the bug
This commit is contained in:
parent
33d7b0aa92
commit
02ec8d48e5
@ -533,6 +533,29 @@ fn fail_with_multiple_packages() {
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cargo_test]
|
||||||
|
fn fail_with_bad_bin_no_package() {
|
||||||
|
let p = project()
|
||||||
|
.file(
|
||||||
|
"src/main.rs",
|
||||||
|
r#"
|
||||||
|
fn main() { println!("hello a.rs"); }
|
||||||
|
"#,
|
||||||
|
)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
p.cargo("rustc --bin main")
|
||||||
|
.with_status(101)
|
||||||
|
.with_stderr_data(str![[r#"
|
||||||
|
|
||||||
|
thread 'main' panicked [..]:
|
||||||
|
The number of packages must be at least 1
|
||||||
|
...
|
||||||
|
|
||||||
|
"#]])
|
||||||
|
.run();
|
||||||
|
}
|
||||||
|
|
||||||
#[cargo_test]
|
#[cargo_test]
|
||||||
fn fail_with_glob() {
|
fn fail_with_glob() {
|
||||||
let p = project()
|
let p = project()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user