From 11d1c51b97ae830b591c51b874da01de90a083dc Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 4 Jul 2026 09:24:02 +0200 Subject: feat: -l skips versionless hints, widen version columns --list now skips hint files with no VERSION (e.g. pure DELREQUIRES hints) and excludes them from the total. Version columns widened 10->22 to fit long version strings without shifting other rows. Adds T57. Co-Authored-By: Claude Opus 4.8 --- tests/mkhint_test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests') diff --git a/tests/mkhint_test.sh b/tests/mkhint_test.sh index 421d7b6..425eba2 100755 --- a/tests/mkhint_test.sh +++ b/tests/mkhint_test.sh @@ -1098,6 +1098,30 @@ code=$? set -e assert_exit_code "mutually exclusive" 1 "$code" +# ── T57: -l skips hints with no VERSION ────────────────────────────────────── +echo "" +echo "T57: -l lists only hints that have a VERSION" +rm -f "$MOCK_HINT"/*.hint "$MOCK_HINT"/*.bak 2>/dev/null +cat > "$MOCK_HINT/curl.hint" << 'EOF' +VERSION="8.5.0" +ARCH="x86_64" +EOF +# no VERSION line at all +cat > "$MOCK_HINT/novers.hint" << 'EOF' +ARCH="x86_64" +DELREQUIRES="rust-opt" +EOF +out=$(run_mkhint -l 2>&1) +echo "$out" | grep -q "curl.hint" \ + && { echo " PASS: versioned hint shown"; (( PASS++ )); } \ + || { echo " FAIL: versioned hint missing"; (( FAIL++ )); ERRORS+=("T57 shown"); } +echo "$out" | grep -q "novers.hint" \ + && { echo " FAIL: versionless hint shown"; (( FAIL++ )); ERRORS+=("T57 skip"); } \ + || { echo " PASS: versionless hint skipped"; (( PASS++ )); } +echo "$out" | grep -q "Total: 1 file" \ + && { echo " PASS: count excludes versionless"; (( PASS++ )); } \ + || { echo " FAIL: count wrong"; (( FAIL++ )); ERRORS+=("T57 count"); } + # ─── SUMMARY ────────────────────────────────────────────────────────────────── teardown -- cgit v1.2.3