2024-07-28 17:13:50 -05:00
|
|
|
use run_make_support::{rfs, rustc};
|
2024-03-17 16:12:17 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
#[cfg(unix)]
|
|
|
|
let non_unicode: &std::ffi::OsStr = std::os::unix::ffi::OsStrExt::from_bytes(&[0xFF]);
|
|
|
|
#[cfg(windows)]
|
|
|
|
let non_unicode: std::ffi::OsString = std::os::windows::ffi::OsStringExt::from_wide(&[0xD800]);
|
|
|
|
let output = rustc().input("non_unicode_env.rs").env("NON_UNICODE_VAR", non_unicode).run_fail();
|
2024-07-17 07:42:06 -05:00
|
|
|
let expected = rfs::read_to_string("non_unicode_env.stderr");
|
2024-06-07 08:23:10 -05:00
|
|
|
output.assert_stderr_equals(expected);
|
2024-03-17 16:12:17 -05:00
|
|
|
}
|