diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-08 11:51:26 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-08 11:51:26 +0200 |
| commit | 9b57db37b6dca87247e30b1e5e2259094c7157b5 (patch) | |
| tree | 59f6302d0c870b7547a7565f0cdc95f46e94111b /tests | |
| parent | 67d4196bb3c98b0f6c00e8e514d9060b1cf7be2f (diff) | |
| download | mkhintfile-9b57db37b6dca87247e30b1e5e2259094c7157b5.tar.gz mkhintfile-9b57db37b6dca87247e30b1e5e2259094c7157b5.zip | |
fix: skip bundled-dep apply prompt when nothing changed; release v1.2.3v1.2.3
After the version-aware reconcile, a --force run on an up-to-date bundle
package still asked "Apply bundled-dep updates?" with nothing to apply.
reconcile_bundle_deps report mode now signals whether there is anything
to apply via its exit code: 2 = changes present, 0 = all current / no
deps / fetch fail. The --check and --hintfile -V callers prompt only on
exit 2. apply mode still returns 0. Adds T-BM24 (all-current → no
prompt); 183 passed.
Bump MKHINT_VERSION and man title to 1.2.3, rebuild mkhint.1.gz.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/mkhint_test.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/mkhint_test.sh b/tests/mkhint_test.sh index eac0fd2..30383d2 100755 --- a/tests/mkhint_test.sh +++ b/tests/mkhint_test.sh @@ -1817,6 +1817,27 @@ 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-BM24: all-current reconcile does NOT prompt to apply ─────────────────── +# When the report finds no changed dep, the caller must skip the "Apply?" +# prompt entirely (report mode returns 0; a change returns 2). +echo "" +echo "T-BM24: --check --force, bundled deps all current → no apply prompt" +setup_bmnvim_check +# manifest tree-sitter at the SAME version as the hint (0.26.7), different shape +cat > "$MOCK_BASE/manifest_fixture" << 'EOF' +NVIM_URL https://github.com/neovim/neovim/archive/v0.13.0.tar.gz +NVIM_SHA256 a +TREESITTER_URL https://github.com/tree-sitter/tree-sitter/archive/v0.26.7.tar.gz +TREESITTER_SHA256 b +EOF +out=$(run_mkhint -C --force bmnvim < <(printf '\n') 2>&1) || true +echo "$out" | grep -q 'bundled deps all current' \ + && ! echo "$out" | grep -q 'Apply bundled-dep updates' \ + && grep -q 'v0.26.7' "$MOCK_HINT/bmnvim.hint" \ + && { echo " PASS: no prompt when all current"; (( PASS++ )); } \ + || { echo " FAIL: T-BM24 prompted on no-op. out=$out"; (( FAIL++ )); ERRORS+=("T-BM24"); } +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" |
