diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-10 12:04:30 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-10 12:04:30 +0200 |
| commit | 7c37592b66cd64de0734e26eac27e04054f761d5 (patch) | |
| tree | a84f3ffbb6313898202b54f88c03528e814e8514 /tests/mkhint_test.sh | |
| parent | 8c2b5e0194ea9be0eb6176976eb7bac1b979c667 (diff) | |
| download | mkhintfile-7c37592b66cd64de0734e26eac27e04054f761d5.tar.gz mkhintfile-7c37592b66cd64de0734e26eac27e04054f761d5.zip | |
feat: add NoDL column to --list
-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 <noreply@anthropic.com>
Diffstat (limited to 'tests/mkhint_test.sh')
| -rwxr-xr-x | tests/mkhint_test.sh | 34 |
1 files changed, 34 insertions, 0 deletions
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 <version>' and exits 0" |
