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:
parent
0008dbbc3a
commit
f079debdee
1 changed files with 4 additions and 1 deletions
|
|
@ -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" $?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue