test(board): plan eval check 6 could pass on an empty scan

"every scanned repo has a PLAN value" compared the count of cells with
the header's repo count and defaulted a missing count to 0, so a table
whose header could not be read and whose cells were all missing gave
0 == 0 and went green. It now requires a positive denominator first.
Verified: breaking the header makes the check red (5 of ?).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-17 16:01:40 +02:00
commit f079debdee

View file

@ -212,7 +212,10 @@ WITH=0
for r in p-none p-fresh p-stale p-docs p-lower; do
[ -n "$(table_cell "$TABLE" "$r")" ] && WITH=$((WITH + 1))
done
[ "$WITH" -eq "${N_REPOS:-0}" ]; check "6: every scanned repo has a PLAN value ($WITH of ${N_REPOS:-?})" $?
# A non-empty, non-zero denominator first: with an empty scan both sides are 0
# and the comparison alone would pass on nothing.
[ "${N_REPOS:-0}" -gt 0 ] && [ "$WITH" -eq "$N_REPOS" ]
check "6: every scanned repo has a PLAN value ($WITH of ${N_REPOS:-?})" $?
printf '%s\n' "$TABLE" | grep -q '^undersoekt: '
check "6: the scan's own denominator line is still printed" $?