From cf4298b9daf180256900d3e5ae61a66b8d9466ff Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 20 Oct 2019 14:47:25 +0200 Subject: [PATCH] Add call() helper Signed-off-by: Matthias Beyer --- tests/ui/src/imag_header.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/ui/src/imag_header.rs b/tests/ui/src/imag_header.rs index 3f87b300..28d95227 100644 --- a/tests/ui/src/imag_header.rs +++ b/tests/ui/src/imag_header.rs @@ -27,6 +27,14 @@ pub fn binary(tempdir: &TempDir) -> Command { crate::imag::binary(tempdir, "imag-header") } +pub fn call(tmpdir: &TempDir, args: &[&str]) -> Vec { + let mut binary = binary(tmpdir); + binary.stdin(std::process::Stdio::inherit()); + binary.args(args); + debug!("Command = {:?}", binary); + crate::imag::stdout_of_command(binary) +} + #[test] fn test_no_header_besides_version_after_creation() { crate::setup_logging();