Skip to content

About

Convenience macro for creating tests which run in child process

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages