fix(lint-test): real-repo sanity-check an aktuellen Schema-State angepasst

- Test 4 umbenannt: "real repo (sanity check, expect exit 1)" →
  "real repo (smoke-test, exit 0=clean OR 1=issues, NEVER 2)"
- Exit-Erwartung gelockert: 0 (clean nach WMT-002) oder 1 (legitime
  Issues) ist OK, nur Exit 2 (Script-Crash) failt
- Section-Suche: 'frontmatter' → 'Frontmatter Präsenz' (case-sensitive
  nach Umlaut, Section heißt seit v1.5 mit Umlaut)
- Bonus-Assert: 'Total Wiki-Pages:' als generische Summary-Sanity
- Ergebnis: 18/18 grün (17 original + 1 neuer Assert)
This commit is contained in:
Hector 2026-06-17 15:26:59 +02:00
parent f5594d7a04
commit d07bf1690a

View file

@ -99,13 +99,24 @@ assert_report_contains "$REPORT" "orphan" "broken-wiki orphans detected"
rm -f "$REPORT"
echo ""
echo "=== Test 4: real repo (sanity check, expect exit 1)==="
echo "=== Test 4: real repo (smoke-test, exit 0=clean OR 1=issues, NEVER 2)==="
REPORT=$(mktemp)
run_lint "$REPO_ROOT" "$REPORT"
EXIT=$?
assert_exit 1 $EXIT "real-repo exit code"
assert_report_contains "$REPORT" "frontmatter" "real-repo frontmatter section"
# Smoke-test: exit 0 (clean state nach WMT-002) oder 1 (legitime Issues) ist OK.
# Nur exit 2 (Script-Crash) ist fail.
if [ "$EXIT" -eq 0 ] || [ "$EXIT" -eq 1 ]; then
echo -e "${GREEN}${NC} real-repo exit code (exit=$EXIT, ok: 0 or 1)"
PASS=$((PASS+1))
else
echo -e "${RED}${NC} real-repo exit code (expected 0 or 1, got $EXIT — Script-Crash?)"
FAIL=$((FAIL+1))
fi
# Section heißt jetzt "Frontmatter Präsenz" (mit Umlaut) — case-sensitive nach Umlaut suchen
assert_report_contains "$REPORT" "Frontmatter Präsenz" "real-repo frontmatter section (Schema v1.5)"
assert_report_contains "$REPORT" "Stub-Quote" "real-repo stub section"
# Generische Sanity: Summary-Linie existiert (egal ob Issues oder nicht)
assert_report_contains "$REPORT" "Total Wiki-Pages:" "real-repo summary line present"
rm -f "$REPORT"
echo ""