Skip to content

Commit

Permalink
fix test of invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
pchickey committed Jan 20, 2025
1 parent 0cb3fbb commit b8e53e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/all/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2070,13 +2070,16 @@ after empty
#[test]
fn cli_hello_stdout() -> Result<()> {
println!("{CLI_HELLO_STDOUT_COMPONENT}");
run_wasmtime(&[
let output = run_wasmtime(&[
"run",
"-Wcomponent-model",
CLI_HELLO_STDOUT_COMPONENT,
"--invoke",
"run()",
CLI_HELLO_STDOUT_COMPONENT,
])?;
// First this component prints "hello world", then the invoke
// result is printed as "ok".
assert_eq!(output, "hello world\nok\n");
Ok(())
}
}
Expand Down

0 comments on commit b8e53e8

Please sign in to comment.