//! Shared test helpers for integration tests.
usestd::sync::{Mutex, MutexGuard, OnceLock};/// Process-wide lock for tests that mutate environment variables
/// like PATH/HOME and other process-global state.
pubfnenv_lock()->MutexGuard<'static, ()>{staticLOCK:OnceLock<Mutex<()>>=OnceLock::new();LOCK.get_or_init(||Mutex::new(())).lock().unwrap()}