1 2 3 4 5 6 7 8 9 10 11
#[allow(clippy::wildcard_imports)] // false positive use assert_cmd::prelude::*; use std::process::Command; fn main() { Command::new("ls") .args(["non-existent"]) .assert() .code(&[3, 42] as &[i32]); }