cosca 0.1.0

Unified cross-platform subprocess management: spawning, stdio, process trees, stable identity, and elevation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Unit tests for Windows Job Object containment helpers.
//! Substantive runtime coverage is in the integration tests (tests/spawn_io.rs).

#[test]
fn job_handle_debug_does_not_panic() {
    // Verify the Debug impl compiles and runs cleanly for a consumed handle.
    use super::JobHandle;
    use std::sync::atomic::AtomicPtr;
    // Construct a consumed (null) JobHandle to verify the Debug impl path.
    // SAFETY: this is test-only; we do NOT pass this to any Win32 call.
    let h = JobHandle {
        raw: AtomicPtr::new(std::ptr::null_mut()),
    };
    let s = format!("{h:?}");
    assert!(s.contains("JobHandle"), "debug output: {s}");
}