2024-05-17 13:29:43 -04: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 14:55:14 -04:00
|
|
|
use std::fs;
|
2024-05-17 13:29:43 -04:00
|
|
|
|
2024-07-29 08:13:50 +10:00
|
|
|
use run_make_support::rustc;
|
|
|
|
|
2024-05-17 13:29:43 -04:00
|
|
|
fn main() {
|
2024-05-17 14:06:38 -04:00
|
|
|
rustc().crate_type("rlib").arg("--test").input("foo.rs").run();
|
2024-05-20 21:30:48 -04:00
|
|
|
assert!(
|
2024-06-06 21:34:34 +02:00
|
|
|
fs::remove_file("foo.bc").is_err(),
|
2024-05-20 21:30:48 -04:00
|
|
|
"An unwanted .bc file was created by run-make/no-intermediate-extras."
|
|
|
|
);
|
2024-05-17 13:29:43 -04:00
|
|
|
}
|