Skip to content

Commit 0c1df37

Browse files
committed
Refactor wasm-abi to use cmd
1 parent 68b6bb2 commit 0c1df37

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tests/run-make/wasm-abi/rmake.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//@ only-wasm32-wasip1
22
//@ needs-wasmtime
33

4-
use run_make_support::rustc;
4+
use run_make_support::{cmd, rustc};
55
use std::path::Path;
6-
use std::process::Command;
76

87
fn main() {
98
rustc().input("foo.rs").target("wasm32-wasip1").run();
@@ -19,14 +18,12 @@ fn main() {
1918
}
2019

2120
fn run(file: &Path, method: &str, expected_output: &str) {
22-
let output = Command::new("wasmtime")
21+
cmd("wasmtime")
2322
.arg("run")
2423
.arg("--preload=host=host.wat")
2524
.arg("--invoke")
2625
.arg(method)
2726
.arg(file)
28-
.output()
29-
.unwrap();
30-
assert!(output.status.success());
31-
assert_eq!(expected_output, String::from_utf8_lossy(&output.stdout));
27+
.run()
28+
.assert_stdout_equals(expected_output);
3229
}

0 commit comments

Comments
 (0)