diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-25 11:56:29 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-25 11:56:29 +0200 |
| commit | bb24e7ab9ef4a1a97e00575f8c13497ec6a3e32d (patch) | |
| tree | 6c41d26ba71348645ab59673594668996c2ac0fd /tests | |
| parent | e1476496aec827af919a33e2b59d3be48c565770 (diff) | |
| download | mkhintfile-master.tar.gz mkhintfile-master.zip | |
Some upstreams name tarballs by a dotless build number while the
SlackBuild VERSION is dotted (sublime_text: VERSION 4.2.00, URL
build_4200), so the version swap missed the URL and the md5 was
recomputed for the old tarball. Also swap the dotless form, only
inside URLs and only as a whole number, leaving md5 hex alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/mkhint_test.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/mkhint_test.sh b/tests/mkhint_test.sh index 2e885dd..36b0676 100755 --- a/tests/mkhint_test.sh +++ b/tests/mkhint_test.sh @@ -542,6 +542,22 @@ assert_contains "URL updated" "$MOCK_HINT/curl.hint" 'curl-8. assert_not_contains "MD5SUM updated" "$MOCK_HINT/curl.hint" 'abc123def456' assert_file_exists "backup created" "$MOCK_HINT/curl.hint.bak" +# ── T93: dotless build number in URL (sublime_text 4.2.00 ↔ build 4200) ─────── +echo "" +echo "T93: --hintfile -V 4.2.15 → URL build_4200 bumped to build_4215" +cat > "$MOCK_HINT/curl.hint" << 'EOF' +VERSION="4.2.00" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://download.example.org/app_build_4200_x64.tar.xz" +MD5SUM_x86_64="4200aaaabbbbccccddddeeeeffff0000" +EOF +run_mkhint -f curl -V 4.2.15 +assert_contains "VERSION updated" "$MOCK_HINT/curl.hint" 'VERSION="4.2.15"' +assert_contains "URL build bumped" "$MOCK_HINT/curl.hint" 'app_build_4215_x64' +assert_not_contains "old md5 gone" "$MOCK_HINT/curl.hint" '4200aaaa' +assert_not_contains "md5 not dotless-swapped" "$MOCK_HINT/curl.hint" '4215aaaa' + # ── T7: --hintfile -v -N → version + md5 updated + NODOWNLOAD ───────────────── echo "" echo "T7: --hintfile -v -N → version + md5 + NODOWNLOAD=yes" |
