MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / greeter

Function greeter

tests/all/cli_tests.rs:362–376  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

360// Run the greeter test, which runs a preloaded reactor and a command.
361#[test]
362fn greeter() -> Result<()> {
363 let wasm = build_wasm("tests/all/cli_tests/greeter_command.wat")?;
364 let stdout = run_wasmtime(&[
365 "run",
366 "-Ccache=n",
367 "--preload",
368 "reactor=tests/all/cli_tests/greeter_reactor.wat",
369 wasm.path().to_str().unwrap(),
370 ])?;
371 assert_eq!(
372 stdout,
373 "Hello _initialize\nHello _start\nHello greet\nHello done\n"
374 );
375 Ok(())
376}
377
378// Run the greeter test, but this time preload a command.
379#[test]

Callers

nothing calls this directly

Calls 6

run_wasmtimeFunction · 0.85
OkFunction · 0.85
to_strMethod · 0.80
build_wasmFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected