()
| 286 | // Exit with an invalid non-zero exit code, snapshot0 edition. |
| 287 | #[test] |
| 288 | fn exit126_wasi_snapshot0() -> Result<()> { |
| 289 | let wasm = build_wasm("tests/all/cli_tests/exit126_wasi_snapshot0.wat")?; |
| 290 | |
| 291 | for preview2 in ["-Spreview2=n", "-Spreview2=y"] { |
| 292 | let output = run_wasmtime_for_output( |
| 293 | &["-Ccache=n", preview2, wasm.path().to_str().unwrap()], |
| 294 | None, |
| 295 | )?; |
| 296 | assert_eq!(output.status.code().unwrap(), 1); |
| 297 | assert!(output.stdout.is_empty()); |
| 298 | assert!(String::from_utf8_lossy(&output.stderr).contains("invalid exit status")); |
| 299 | } |
| 300 | Ok(()) |
| 301 | } |
| 302 | |
| 303 | // Exit with an invalid non-zero exit code, snapshot1 edition. |
| 304 | #[test] |
nothing calls this directly
no test coverage detected