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

Function p2_cli_stdin_empty

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

Source from the content-addressed store, hash-verified

1162
1163 #[test]
1164 fn p2_cli_stdin_empty() -> Result<()> {
1165 let mut child = get_wasmtime_command()?
1166 .args(&["run", "-Wcomponent-model", P2_CLI_STDIN_EMPTY_COMPONENT])
1167 .stdout(Stdio::piped())
1168 .stderr(Stdio::piped())
1169 .stdin(Stdio::piped())
1170 .spawn()?;
1171 child
1172 .stdin
1173 .take()
1174 .unwrap()
1175 .write_all(b"not to be read")
1176 .unwrap();
1177 let output = child.wait_with_output()?;
1178 println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
1179 println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
1180 assert!(output.status.success());
1181 Ok(())
1182 }
1183
1184 #[test]
1185 fn p2_cli_stdin() -> Result<()> {

Callers

nothing calls this directly

Calls 10

get_wasmtime_commandFunction · 0.85
OkFunction · 0.85
write_allMethod · 0.80
spawnMethod · 0.45
stdinMethod · 0.45
stderrMethod · 0.45
stdoutMethod · 0.45
argsMethod · 0.45
unwrapMethod · 0.45
takeMethod · 0.45

Tested by

no test coverage detected