subprocess-test

Crates.iosubprocess-test
lib.rssubprocess-test
version0.1.2
created_at2025-04-20 21:28:23.444881+00
updated_at2025-04-24 13:12:19.436375+00
descriptionConvenience macro for creating tests which run in child process
homepage
repositoryhttps://github.com/target-san/subprocess-test
max_upload_size
id1642028
size26,447
Igor (target-san)

documentation

README

Subprocess test

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");
    }
}
Commit count: 17

cargo fmt