os-rust/tests/run-make/no-intermediate-extras/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
578 B
Rust
Raw Normal View History

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
use run_make_support::{rustc, tmp_dir};
2024-05-17 14:55:14 -04:00
use std::fs;
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!(
fs::remove_file(tmp_dir().join("foo.bc")).is_err(),
"An unwanted .bc file was created by run-make/no-intermediate-extras."
);
2024-05-17 13:29:43 -04:00
}