2024-05-17 12:29:43 -05:00
|
|
|
// When using the --test flag with an rlib, this used to generate
|
|
|
|
// an unwanted .bc file, which should not exist. This test checks
|
|
|
|
// that the bug causing the generation of this file has not returned.
|
|
|
|
// See https://github.com/rust-lang/rust/issues/10973
|
|
|
|
|
|
|
|
//@ ignore-cross-compile
|
|
|
|
|
2024-05-17 13:55:14 -05:00
|
|
|
use std::fs;
|
2024-05-17 12:29:43 -05:00
|
|
|
|
2024-06-06 14:34:34 -05:00
|
|
|
use run_make_support::rustc;
|
2024-07-28 17:13:50 -05:00
|
|
|
|
2024-05-17 12:29:43 -05:00
|
|
|
fn main() {
|
2024-05-17 13:06:38 -05:00
|
|
|
rustc().crate_type("rlib").arg("--test").input("foo.rs").run();
|
2024-05-20 20:30:48 -05:00
|
|
|
assert!(
|
2024-06-06 14:34:34 -05:00
|
|
|
fs::remove_file("foo.bc").is_err(),
|
2024-05-20 20:30:48 -05:00
|
|
|
"An unwanted .bc file was created by run-make/no-intermediate-extras."
|
|
|
|
);
|
2024-05-17 12:29:43 -05:00
|
|
|
}
|