()
| 754 | #[test] |
| 755 | #[cfg_attr(not(feature = "component-model"), ignore)] |
| 756 | fn component_missing_feature() -> Result<()> { |
| 757 | let path = "tests/all/cli_tests/empty-component.wat"; |
| 758 | let wasm = build_wasm(path)?; |
| 759 | let output = get_wasmtime_command()? |
| 760 | .arg("-Ccache=n") |
| 761 | .arg("-Wcomponent-model=n") |
| 762 | .arg(wasm.path()) |
| 763 | .output()?; |
| 764 | assert!(!output.status.success()); |
| 765 | let stderr = String::from_utf8_lossy(&output.stderr); |
| 766 | assert!( |
| 767 | stderr.contains("cannot execute a component without `--wasm component-model`"), |
| 768 | "bad stderr: {stderr}" |
| 769 | ); |
| 770 | |
| 771 | // also tests with raw *.wat input |
| 772 | let output = get_wasmtime_command()? |
| 773 | .arg("-Ccache=n") |
| 774 | .arg("-Wcomponent-model=n") |
| 775 | .arg(path) |
| 776 | .output()?; |
| 777 | assert!(!output.status.success()); |
| 778 | let stderr = String::from_utf8_lossy(&output.stderr); |
| 779 | assert!( |
| 780 | stderr.contains("cannot execute a component without `--wasm component-model`"), |
| 781 | "bad stderr: {stderr}" |
| 782 | ); |
| 783 | |
| 784 | Ok(()) |
| 785 | } |
| 786 | |
| 787 | #[test] |
| 788 | #[cfg_attr(not(feature = "component-model"), ignore)] |
nothing calls this directly
no test coverage detected