Files
dotfiles-public/.tests/mutations/08-no-unattended-invasive-filter.mut
bcherb2 d1e3f8bce2 test: mutation testing — break dotup on purpose and check the suite notices
Each file in .tests/mutations/ is one deliberate bug: what it breaks, why that
matters, the assertion meant to catch it, and an OLD/NEW pair applied to a copy
of the tree. A mutation is KILLED only when the suite fails AND the named
assertion is among the failures — failing for an unrelated reason is reported
as WRONG-TEST, because that is luck, and luck is lost the next time the
unrelated test moves. A mutation whose OLD block no longer matches is STALE
rather than quietly skipped.

19 reproduces the DU-C1 shape: a comment moved back inside the fzf
line-continuation. It is killed by "dotup pick exits 0".
2026-08-21 22:34:53 -04:00

20 lines
663 B
Plaintext

# what: cmd_install's unattended invasive refusal, deleted
# why: a stale state file would install a docker daemon on a machine with nobody at the keyboard
# kills: the daemon never reaches a package manager
# run: unit
<<<OLD
if [ "$UNATTENDED" -eq 1 ]; then
inv=$(awk -F'\t' -v selfile="$SEL" '
BEGIN{ while((getline l < selfile)>0) sel[l]=1 }
!/^[#@]/ && NF>=3 && $3=="invasive" && (($1"/"$2) in sel) {print $1"/"$2}' "$MANIFEST")
if [ -n "$inv" ]; then
warn "unattended: refusing invasive packages$(printf ' %s' $inv)"
for k in $inv; do
awk -F'\t' -v k="$k" '$3!=k' "$tbl" > "$tbl.f"; mv "$tbl.f" "$tbl"
done
fi
fi
<<<NEW
<<<END