File: diagnostics.rs

package info (click to toggle)
rust-cargo 0.91.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 16,860 kB
  • sloc: javascript: 426; sh: 315; python: 88; xml: 21; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use crate::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();
}