2024-05-29 11:00:14 -05:00
|
|
|
use run_make_support::{bin_name, rust_lib_name, rustc};
|
2024-05-29 08:52:29 -05:00
|
|
|
|
|
|
|
fn main() {
|
2024-06-07 08:23:10 -05:00
|
|
|
rustc().print("crate-name").input("crate.rs").run().assert_stdout_equals("foo");
|
|
|
|
rustc().print("file-names").input("crate.rs").run().assert_stdout_equals(bin_name("foo"));
|
|
|
|
rustc()
|
|
|
|
.print("file-names")
|
|
|
|
.crate_type("lib")
|
|
|
|
.arg("--test")
|
|
|
|
.input("crate.rs")
|
|
|
|
.run()
|
|
|
|
.assert_stdout_equals(bin_name("foo"));
|
|
|
|
rustc()
|
|
|
|
.print("file-names")
|
|
|
|
.arg("--test")
|
|
|
|
.input("lib.rs")
|
|
|
|
.run()
|
|
|
|
.assert_stdout_equals(bin_name("mylib"));
|
|
|
|
rustc().print("file-names").input("lib.rs").run().assert_stdout_equals(rust_lib_name("mylib"));
|
|
|
|
rustc().print("file-names").input("rlib.rs").run().assert_stdout_equals(rust_lib_name("mylib"));
|
2024-05-29 08:52:29 -05:00
|
|
|
}
|