about summary refs log tree commit diff
path: root/tests/run-make/raw-dylib-custom-dlltool/rmake.rs
blob: 86b952f0b452064c35934b289774f3d0b764718f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Instead of using the default dlltool, the rust compiler can also accept a custom
// command file with the -C dlltool flag. This test uses it to compile some rust code
// with the raw_dylib Windows-exclusive feature, and checks that the output contains
// the string passed from the custom dlltool, confirming that the default dlltool was
// successfully overridden.
// See https://github.com/rust-lang/rust/pull/109677

//@ only-windows
//@ only-gnu
//@ needs-dlltool
// Reason: this test specifically checks the custom dlltool feature, only
// available on Windows-gnu.

use run_make_support::{diff, rustc};

fn main() {
    let out = rustc()
        .crate_type("lib")
        .crate_name("raw_dylib_test")
        .input("lib.rs")
        .arg("-Cdlltool=script.cmd")
        .run();
    diff().expected_file("output.txt").actual_file("actual.txt").normalize(r#"\r"#, "").run();
}