aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-07 19:27:47 +0200
committerDanilo M. <danix@danix.xyz>2026-07-07 19:27:47 +0200
commit79e4425a07ed3b57199eefb65b525485448c31f5 (patch)
treeaaf1340a27026a2d4538abb85f6fd0427f2d2f0e /tests
parent38955ce02ad3897f6304c4bdc58977f32b89f5f5 (diff)
downloadmkhintfile-79e4425a07ed3b57199eefb65b525485448c31f5.tar.gz
mkhintfile-79e4425a07ed3b57199eefb65b525485448c31f5.zip
feat: --hintfile -V reconciles bundled deps for listed packages
Parity with --check: the update path runs Phase 2 (report + apply) after the primary bump. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/mkhint_test.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/mkhint_test.sh b/tests/mkhint_test.sh
index 8e1eed4..a684fe7 100755
--- a/tests/mkhint_test.sh
+++ b/tests/mkhint_test.sh
@@ -1747,6 +1747,36 @@ echo "$out" | grep -q 'deps not in hint:' && echo "$out" | grep -qi 'wasmtime' \
|| { echo " FAIL: FYI. out=$out"; (( FAIL++ )); ERRORS+=("T-BM16"); }
rm -f "$MOCK_BASE/manifest_fixture" "$MOCK_BASE/bundle-manifests" "$MOCK_HINT/bmnvim.hint"
+# ── T-BM18: --hintfile -V on a listed pkg reconciles bundled deps ────────────
+echo ""
+echo "T-BM18: -f listed pkg -V bumps primary AND reconciles bundled deps"
+cat > "$MOCK_BASE/bundle-manifests" << 'EOF'
+bmnvim https://example.com/bmnvim/v{VERSION}/deps.txt
+EOF
+cat > "$MOCK_BASE/manifest_fixture" << 'EOF'
+NVIM_URL https://github.com/neovim/neovim/archive/v0.14.0.tar.gz
+NVIM_SHA256 a
+TREESITTER_URL https://github.com/tree-sitter/tree-sitter/archive/v0.26.8.tar.gz
+TREESITTER_SHA256 b
+EOF
+cat > "$MOCK_HINT/bmnvim.hint" << 'EOF'
+VERSION="0.13.0"
+DOWNLOAD="https://github.com/neovim/neovim/archive/v0.13.0/bmnvim-0.13.0.tar.gz \
+ https://github.com/tree-sitter/tree-sitter/archive/v0.26.7/tree-sitter-0.26.7.tar.gz"
+MD5SUM="aaa \
+ bbb"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+ARCH="x86_64"
+EOF
+# stdin: continuation-URL prompt(s) for the primary bump, then apply Y, then slackrepo n
+run_mkhint -f bmnvim -V 0.14.0 < <(printf '\nY\nn\n') >/dev/null 2>&1 || true
+grep -q 'VERSION="0.14.0"' "$MOCK_HINT/bmnvim.hint" \
+ && grep -q 'tree-sitter/archive/v0.26.8' "$MOCK_HINT/bmnvim.hint" \
+ && { echo " PASS: -f -V bumped primary + reconciled deps"; (( PASS++ )); } \
+ || { echo " FAIL: -f -V parity:"; cat "$MOCK_HINT/bmnvim.hint"; (( FAIL++ )); ERRORS+=("T-BM18"); }
+rm -f "$MOCK_BASE/manifest_fixture" "$MOCK_BASE/bundle-manifests" "$MOCK_HINT/bmnvim.hint"
+
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
teardown