| Crates.io | subprocess-test |
| lib.rs | subprocess-test |
| version | 0.1.2 |
| created_at | 2025-04-20 21:28:23.444881+00 |
| updated_at | 2025-04-24 13:12:19.436375+00 |
| description | Convenience macro for creating tests which run in child process |
| homepage | |
| repository | https://github.com/target-san/subprocess-test |
| max_upload_size | |
| id | 1642028 |
| size | 26,447 |
Introduces macro and some infrastructure that allows running your test code in separate subprocess and verify it, if needed, inside test invocation. See crate documentation for details.
Some small examples:
subprocess_test::subprocess_test! {
#[test]
fn just_success() {
let value = 1;
assert_eq!(value + 1, 2);
}
/// Custom validation of output
#[test]
fn one_plus_one() {
println!("{}", 1 + 1);
}
verify |success, output| {
assert!(success);
assert_eq!(output, "2\n");
}
}