MCPcopy Create free account
hub / github.com/bootc-dev/bootc / command_run_ext_json

Function command_run_ext_json

crates/utils/src/command.rs:331–343  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

329
330 #[test]
331 fn command_run_ext_json() {
332 #[derive(serde::Deserialize)]
333 struct Foo {
334 a: String,
335 b: u32,
336 }
337 let v: Foo = Command::new("echo")
338 .arg(r##"{"a": "somevalue", "b": 42}"##)
339 .run_and_parse_json()
340 .unwrap();
341 assert_eq!(v.a, "somevalue");
342 assert_eq!(v.b, 42);
343 }
344
345 #[tokio::test]
346 async fn async_command_run_ext() {

Callers

nothing calls this directly

Calls 2

run_and_parse_jsonMethod · 0.80
argMethod · 0.80

Tested by

no test coverage detected