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

Function component_missing_feature

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

Source from the content-addressed store, hash-verified

754#[test]
755#[cfg_attr(not(feature = "component-model"), ignore)]
756fn 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)]

Callers

nothing calls this directly

Calls 6

get_wasmtime_commandFunction · 0.85
OkFunction · 0.85
outputMethod · 0.80
build_wasmFunction · 0.70
argMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected