1.2 KiB
1.2 KiB
PASS
r2 check:
- tests/scripts/doctor.sh:15 test list tracked doctor's own list: fixed. The test now hard-codes the 11 tools on line 8 and asserts a version line for each one. Re-ran the r2 scenario by deleting
check pkg-configandcheck git-lfsfrom a copy of doctor.sh. The test printsFAIL: no version line for pkg-configand exits 1. - tests/scripts/doctor.sh:13 real system tools leaked into the absent case: fixed. Line 14 sets
PATH="$stubs"only and starts doctor with"$BASH". doctor.sh uses only builtins now, sinceheadwas replaced by${out%%$'\n'*}, so nothing outside the stub directory can be found.
Verified this round:
bash tests/scripts/doctor.shprintsdoctor.sh: present, absent x11, broken passand exits 0. It does the same under /bin/bash 3.2.bash scripts/doctor.shon this host prints versions for all 11 tools, including cmake 4.4.3, ninja 1.13.2, pkg-config 3.0.7 and git-lfs 3.8.0, and exits 0.- Mutant with
exit 0in place ofexit "$failed": the test fails withrustc absent: doctor exited 0. - A stub on PATH that is not executable is reported as
BROKEN cmake: ... Permission denied, and doctor exits 1.
No new defects in the changed code.