Skip to content

Missing Compiling message #71

@epage

Description

@epage

The following test fails

#[cargo_test]
fn fixes_missing_ampersand() {
    let p = project()
        .file("src/main.rs", "fn main() { let mut x = 3; let _ = x; }")
        .file(
            "src/lib.rs",
            r#"
                pub fn foo() { let mut x = 3; let _ = x; }

                #[test]
                pub fn foo2() { let mut x = 3; let _ = x; }
            "#,
        )
        .file(
            "tests/a.rs",
            r#"
                #[test]
                pub fn foo() { let mut x = 3; let _ = x; }
            "#,
        )
        .file("examples/foo.rs", "fn main() { let mut x = 3; let _ = x; }")
        .file("build.rs", "fn main() { let mut x = 3; let _ = x; }")
        .build();

    p.cargo("fix --all-targets --allow-no-vcs")
        .env("__CARGO_FIX_YOLO", "1")
        .with_stdout_data("")
        // Don't assert number of fixes for `src/lib.rs`, as we don't know if we're
        // fixing it once or twice! We run this all concurrently, and if we
        // compile (and fix) in `--test` mode first, we get two fixes. Otherwise
        // we'll fix one non-test thing, and then fix another one later in
        // test mode.
        .with_stderr_data(
            str![[r#"
[COMPILING] foo v0.0.1 ([ROOT]/foo)
[FIXED] build.rs (1 fix)
[FIXED] src/lib.rs ([..]fix[..])
[FIXED] src/main.rs (1 fix)
[FIXED] examples/foo.rs (1 fix)
[FIXED] tests/a.rs (1 fix)
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
...
"#]]
            .unordered(),
        )
        .run();
    p.cargo("check").run();
    p.cargo("test").run();
}

Our version lacks COMPILING (and FINISHED but thats a separate issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot as expected

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions