diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-10-20 14:47:25 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-11-03 11:30:33 +0100 |
commit | cf4298b9daf180256900d3e5ae61a66b8d9466ff (patch) | |
tree | 6c264f4bbebdbafe6f4780a48df851fd66ce738d /tests | |
parent | a837cff38228d1383b774cd27737af7b2ee29a70 (diff) |
Add call() helper
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ui/src/imag_header.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<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] fn test_no_header_besides_version_after_creation() { crate::setup_logging(); |