artifactize-core 0.27.0

The library behind artifactize: Artifacts, evals, reviews, the monitor and review models, and the shared operations every interface calls.
Documentation
use artifactize_foundation::platform::process::*;
use std::io;

/// The exit fixture ([`crate::test_os::windows_exit`]): exits with the code it is given.
#[test]
fn exit_probe() {
    if let Some(code) = std::env::var_os("ARTIFACTIZE_EXIT_PROBE") {
        std::process::exit(code.to_str().unwrap().parse().unwrap());
    }
}

#[tokio::test]
async fn exit_code_259_does_not_mean_the_process_is_alive() {
    let mut child = crate::test_os::windows_exit(259).spawn().unwrap();
    let pid = child.id().unwrap();
    assert_eq!(child.wait().await.unwrap().code(), Some(259));
    assert!(
        !crate::test_os::running(pid),
        "the fixture sees a terminated process"
    );
    assert_eq!(
        process_start_time(pid).unwrap_err().kind(),
        io::ErrorKind::NotFound
    );
}