cargo/tests/testsuite/diagnostics.rs
Ed Page 5b9799c6f4 refactor: Migrate from extern crate to test-support prelude
We now include the prelude in so many places, this simplifies how we can
present how `cargo-test-support` works.

Yes, this included some `use` clean ups but its already painful enough
walking through every test file, I didn't want to do it twice.
2024-07-12 15:57:00 -05:00

34 lines
570 B
Rust

use cargo_test_support::prelude::*;
use cargo_test_support::project;
use cargo_test_support::str;
#[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_data(str![[r#"
[ERROR] invalid type: map, expected a sequence
--> Cargo.toml:6:3
|
6 | [[bench.foo]]
| ^^^^^
|
"#]])
.run();
}