Skip to content

Commit 65e299a

Browse files
committed
tests: fix stdin-rustc
1 parent 648e111 commit 65e299a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/run-make/stdin-rustc/rmake.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use std::path::PathBuf;
44

5-
use run_make_support::{is_windows, rustc};
5+
use run_make_support::{bin_name, is_windows, rustc};
66

77
const HELLO_WORLD: &str = r#"
88
fn main() {
@@ -15,11 +15,7 @@ const NOT_UTF8: &[u8] = &[0xff, 0xff, 0xff];
1515
fn main() {
1616
// echo $HELLO_WORLD | rustc -
1717
rustc().arg("-").stdin_buf(HELLO_WORLD).run();
18-
assert!(
19-
PathBuf::from(if !is_windows() { "rust_out" } else { "rust_out.exe" })
20-
.try_exists()
21-
.unwrap()
22-
);
18+
assert!(bin_name("rust_out").exists());
2319

2420
// echo $NOT_UTF8 | rustc -
2521
rustc().arg("-").stdin_buf(NOT_UTF8).run_fail().assert_stderr_contains(

0 commit comments

Comments
 (0)