1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Tests for cli_outbound, split by concern to leave growth room under
//! the 300-line source cap:
//! - [`run`]: constructor, binary resolution, argv, happy-path streaming,
//! `run_in` cwd propagation.
//! - [`stream`]: chunk iteration, `exit_info` classification, `pump_step`.
//! - [`spawn`]: spawn-error and drop→SIGTERM→SIGKILL cleanup.
//! - [`self_exe`]: which file yog itself is — the `stat` judgement over one
//! reading and the process-lifetime memo over it (bl-f558).
//! - [`detach`]: `spawn_detached` — parent-survival, cwd propagation, the
//! per-spawn stderr sink (and its null degradation), spawn error, and the
//! reaping of an exited child (no zombie left parented to us, bl-3016).
//!
//! Shared fixtures (`write_script`, `collect`, `process_exists`) live here
//! so the submodules do not duplicate them. Binary resolution is tested
//! against an injected env lookup ([`Cli::resolve_with`]), so no test
//! mutates ambient env. Every script here is authored by
//! `crate::test_support::write_exec`, which is the whole of the ETXTBSY
//! discipline since bl-fd28 — no lock, no bracket, no per-test contract.
use *;
use fs;
// Spawn discipline rationale and the binary-wide lock live in
// crate::test_support — one static for every test module, because
// per-module locks do not exclude each other's threads.