2024-06-11 11:53:33 -05:00
|
|
|
// Rust files with hyphens in their filename should
|
|
|
|
// not result in compiled libraries keeping that hyphen -
|
|
|
|
// it should become an underscore. Only bin executables
|
|
|
|
// should keep the hyphen. This test ensures that this rule
|
|
|
|
// remains enforced.
|
|
|
|
// See https://github.com/rust-lang/rust/pull/23786
|
|
|
|
|
|
|
|
//@ ignore-cross-compile
|
|
|
|
|
2024-06-11 15:12:36 -05:00
|
|
|
use run_make_support::{bin_name, path, rust_lib_name, rustc};
|
2024-06-11 11:53:33 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
rustc().input("foo-bar.rs").crate_type("bin").run();
|
|
|
|
assert!(path(bin_name("foo-bar")).exists());
|
|
|
|
rustc().input("foo-bar.rs").crate_type("lib").run();
|
2024-06-11 15:12:36 -05:00
|
|
|
assert!(path(rust_lib_name("foo_bar")).exists());
|
2024-06-11 11:53:33 -05:00
|
|
|
}
|