mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
test(diagnostic): Show panic
This commit is contained in:
parent
e1ebce1035
commit
f2a4a3e88b
23
tests/testsuite/diagnostics.rs
Normal file
23
tests/testsuite/diagnostics.rs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
use cargo_test_support::project;
|
||||||
|
|
||||||
|
#[cargo_test]
|
||||||
|
fn dont_panic_on_render() {
|
||||||
|
let p = project()
|
||||||
|
.file(
|
||||||
|
"Cargo.toml",
|
||||||
|
r#"
|
||||||
|
[package]
|
||||||
|
name = "foo"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
[[bench.foo]]
|
||||||
|
"#,
|
||||||
|
)
|
||||||
|
.file("src/lib.rs", "")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
p.cargo("check")
|
||||||
|
.with_status(101)
|
||||||
|
.with_stderr_contains("attempt to subtract with overflow")
|
||||||
|
.run();
|
||||||
|
}
|
@ -79,6 +79,7 @@ mod cross_publish;
|
|||||||
mod custom_target;
|
mod custom_target;
|
||||||
mod death;
|
mod death;
|
||||||
mod dep_info;
|
mod dep_info;
|
||||||
|
mod diagnostics;
|
||||||
mod direct_minimal_versions;
|
mod direct_minimal_versions;
|
||||||
mod directory;
|
mod directory;
|
||||||
mod doc;
|
mod doc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user