2024-01-20 16:51:59 +00:00
|
|
|
// ignore-tidy-linelength
|
|
|
|
|
2024-03-13 21:52:23 +00:00
|
|
|
// Check that the `CURRENT_RUSTC_VERSION` placeholder is correctly replaced by the current
|
|
|
|
// `rustc` version and the `since` property in feature stability gating is properly respected.
|
|
|
|
|
2024-01-20 16:51:59 +00:00
|
|
|
use std::path::PathBuf;
|
|
|
|
|
2024-07-17 13:31:38 +00:00
|
|
|
use run_make_support::{aux_build, rfs, rustc, source_root};
|
2024-01-20 16:51:59 +00:00
|
|
|
|
|
|
|
fn main() {
|
2024-03-13 21:52:23 +00:00
|
|
|
aux_build().input("stable.rs").emit("metadata").run();
|
|
|
|
|
2024-06-07 15:23:10 +02:00
|
|
|
let output =
|
|
|
|
rustc().input("main.rs").emit("metadata").extern_("stable", "libstable.rmeta").run();
|
2024-07-17 12:42:06 +00:00
|
|
|
let version = rfs::read_to_string(source_root().join("src/version"));
|
2024-01-20 16:51:59 +00:00
|
|
|
let expected_string = format!("stable since {}", version.trim());
|
2024-06-07 15:23:10 +02:00
|
|
|
output.assert_stderr_contains(expected_string);
|
2024-01-20 16:51:59 +00:00
|
|
|
}
|