Add call() helper
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
a837cff382
commit
cf4298b9da
1 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,14 @@ pub fn binary(tempdir: &TempDir) -> Command {
|
||||||
crate::imag::binary(tempdir, "imag-header")
|
crate::imag::binary(tempdir, "imag-header")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn call(tmpdir: &TempDir, args: &[&str]) -> Vec<String> {
|
||||||
|
let mut binary = binary(tmpdir);
|
||||||
|
binary.stdin(std::process::Stdio::inherit());
|
||||||
|
binary.args(args);
|
||||||
|
debug!("Command = {:?}", binary);
|
||||||
|
crate::imag::stdout_of_command(binary)
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_no_header_besides_version_after_creation() {
|
fn test_no_header_besides_version_after_creation() {
|
||||||
crate::setup_logging();
|
crate::setup_logging();
|
||||||
|
|
Loading…
Reference in a new issue