Skip to content

target-san/subprocess-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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");
    }
}

About

Convenience macro for creating tests which run in child process

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages