Function assert_termination

Source
pub async fn assert_termination<F, Fut>(f: F, expected_code: i32) -> Result<()>
where F: FnOnce() -> Fut, Fut: Future<Output = ()>,
Expand description

Fork a child process, execute the given function in that process, and verify that the process exits with the given exit code.