| Crates.io | exec-target |
| lib.rs | exec-target |
| version | 0.2.10 |
| created_at | 2021-07-03 00:28:19.491159+00 |
| updated_at | 2025-08-31 08:24:43.813848+00 |
| description | the simple invoke command for test |
| homepage | |
| repository | https://github.com/aki-akaguma/exec-target |
| max_upload_size | |
| id | 418067 |
| size | 32,337 |
the simple invoke command for test
This invokes external a command and manipulates standard in out.
You can use std::process::Command more easily.
use exec_target::exec_target_with_env_in;
let command = "target/debug/exe-stab-grep";
let args = &["--color=always", "-e", "c"];
let envs = vec![("GREP_COLORS", "ms=01;32")];
let inp = b"abcdefg\n" as &[u8];
let oup = exec_target_with_env_in(command, args, envs, inp);
assert_eq!(oup.stderr, "");
assert_eq!(oup.stdout, "ab\u{1b}[01;32m\u{1b}[Kc\u{1b}[m\u{1b}[Kdefg\n");
assert_eq!(oup.status.success(), true);
This project is licensed under either of
at your option.