From 7c37592b66cd64de0734e26eac27e04054f761d5 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 10 Jul 2026 12:04:30 +0200 Subject: feat: add NoDL column to --list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -l now shows a NoDL column (✓ when the hint has NODOWNLOAD=yes) next to the existing DelReq column. Detected via grep -qi '^NODOWNLOAD=yes', padded with _pad_glyph for multibyte alignment. Tests T68/T69 cover populated and blank NoDL. Docs (CLAUDE.md, README, man page) updated and mkhint.1.gz rebuilt. Co-Authored-By: Claude Opus 4.8 --- tests/mkhint_test.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'tests/mkhint_test.sh') diff --git a/tests/mkhint_test.sh b/tests/mkhint_test.sh index b30273e..4c74501 100755 --- a/tests/mkhint_test.sh +++ b/tests/mkhint_test.sh @@ -1436,6 +1436,40 @@ echo "$out" | grep curl.hint | grep -q "✓" \ && { echo " FAIL: ✓ shown without DELREQUIRES"; (( FAIL++ )); ERRORS+=("T64 check"); } \ || { echo " PASS: no ✓ without DELREQUIRES"; (( PASS++ )); } +# ── T68: -l shows ✓ in NoDL for hint with NODOWNLOAD=yes ───────────────────── +echo "" +echo "T68: -l NoDL column shows ✓ when NODOWNLOAD=yes" +rm -f "$MOCK_HINT"/*.hint "$MOCK_HINT"/*.bak 2>/dev/null +cat > "$MOCK_HINT/curl.hint" << 'EOF' +VERSION="8.5.0" +ARCH="x86_64" +DOWNLOAD="https://curl.se/download/curl-8.5.0.tar.gz" +MD5SUM="abc123def456abc123def456abc123de" +NODOWNLOAD=yes +EOF +out=$(run_mkhint -l 2>&1) +echo "$out" | grep -q "NoDL" \ + && { echo " PASS: NoDL header present"; (( PASS++ )); } \ + || { echo " FAIL: NoDL header missing"; echo "$out" | sed 's/^/ /'; (( FAIL++ )); ERRORS+=("T68 header"); } +echo "$out" | grep curl.hint | grep -q "✓" \ + && { echo " PASS: ✓ shown for NODOWNLOAD hint"; (( PASS++ )); } \ + || { echo " FAIL: ✓ missing"; echo "$out" | grep curl.hint | sed 's/^/ /'; (( FAIL++ )); ERRORS+=("T68 check"); } + +# ── T69: -l NoDL blank when no NODOWNLOAD ──────────────────────────────────── +echo "" +echo "T69: -l NoDL column blank when no NODOWNLOAD" +rm -f "$MOCK_HINT"/*.hint "$MOCK_HINT"/*.bak 2>/dev/null +cat > "$MOCK_HINT/curl.hint" << 'EOF' +VERSION="8.5.0" +ARCH="x86_64" +DOWNLOAD="https://curl.se/download/curl-8.5.0.tar.gz" +MD5SUM="abc123def456abc123def456abc123de" +EOF +out=$(run_mkhint -l 2>&1) +echo "$out" | grep curl.hint | grep -q "✓" \ + && { echo " FAIL: ✓ shown without NODOWNLOAD"; (( FAIL++ )); ERRORS+=("T69 check"); } \ + || { echo " PASS: no ✓ without NODOWNLOAD"; (( PASS++ )); } + # ── T65: mkhint -v prints tool version ─────────────────────────────────────── echo "" echo "T65: -v prints 'mkhint ' and exits 0" -- cgit v1.2.3