Skip to content

Commit b8e53e8

Browse files
committed
fix test of invoke
1 parent 0cb3fbb commit b8e53e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/all/cli_tests.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -2070,13 +2070,16 @@ after empty
20702070
#[test]
20712071
fn cli_hello_stdout() -> Result<()> {
20722072
println!("{CLI_HELLO_STDOUT_COMPONENT}");
2073-
run_wasmtime(&[
2073+
let output = run_wasmtime(&[
20742074
"run",
20752075
"-Wcomponent-model",
2076-
CLI_HELLO_STDOUT_COMPONENT,
20772076
"--invoke",
20782077
"run()",
2078+
CLI_HELLO_STDOUT_COMPONENT,
20792079
])?;
2080+
// First this component prints "hello world", then the invoke
2081+
// result is printed as "ok".
2082+
assert_eq!(output, "hello world\nok\n");
20802083
Ok(())
20812084
}
20822085
}

0 commit comments

Comments
 (0)