2024-05-24 10:50:35 -05:00
|
|
|
// When an empty output file is passed to rustc, the ensuing error message
|
|
|
|
// should be clear. However, calling file_stem on an empty path returns None,
|
|
|
|
// which, when unwrapped, causes a panic, stopping execution of rustc
|
|
|
|
// and printing an obscure message instead of reaching the helpful
|
|
|
|
// error message. This test checks that the panic does not occur.
|
|
|
|
// See https://github.com/rust-lang/rust/pull/26199
|
|
|
|
|
|
|
|
use run_make_support::rustc;
|
|
|
|
|
|
|
|
fn main() {
|
2024-09-04 19:02:32 -05:00
|
|
|
let output = rustc().output("").stdin_buf(b"fn main() {}").run_fail();
|
2024-05-24 10:50:35 -05:00
|
|
|
output.assert_stderr_not_contains("panic");
|
|
|
|
}
|