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

Function exit126_wasi_snapshot1

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

Source from the content-addressed store, hash-verified

303// Exit with an invalid non-zero exit code, snapshot1 edition.
304#[test]
305fn exit126_wasi_snapshot1() -> Result<()> {
306 let wasm = build_wasm("tests/all/cli_tests/exit126_wasi_snapshot1.wat")?;
307 let output = run_wasmtime_for_output(&[wasm.path().to_str().unwrap(), "-Ccache=n"], None)?;
308 assert_eq!(output.status.code().unwrap(), 1);
309 assert!(output.stdout.is_empty());
310 assert!(String::from_utf8_lossy(&output.stderr).contains("invalid exit status"));
311 Ok(())
312}
313
314// Run a minimal command program.
315#[test]

Callers

nothing calls this directly

Calls 6

run_wasmtime_for_outputFunction · 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