diff options
| -rwxr-xr-x | mkhint | 6 | ||||
| -rwxr-xr-x | tests/mkhint_test.sh | 5 |
2 files changed, 11 insertions, 0 deletions
@@ -572,6 +572,12 @@ reconcile_bundle_deps() { local -a new_urls=("${urls[@]}") local -a changed_idx=() changed_from=() changed_to=() local i m + + # The primary hint URL (index 0) is never reconciled, but its manifest + # counterpart must count as "matched" so the FYI doesn't always flag it. + local _pm; _pm=$(match_dep_url "${urls[0]}" "$mlist") || _pm="" + [[ -n "$_pm" ]] && matched_manifest["$_pm"]=1 + for (( i=1; i<${#urls[@]}; i++ )); do m=$(match_dep_url "${urls[$i]}" "$mlist") || m="" if [[ -z "$m" ]]; then diff --git a/tests/mkhint_test.sh b/tests/mkhint_test.sh index 9ec0037..8e1eed4 100755 --- a/tests/mkhint_test.sh +++ b/tests/mkhint_test.sh @@ -1737,7 +1737,12 @@ WASMTIME_URL https://github.com/bytecodealliance/wasmtime/archive/v36.0.6.tar.gz WASMTIME_SHA256 c EOF out=$(run_mkhint -C --force bmnvim < <(printf 'n\n') 2>&1) || true +# FYI block is the lines between "manifest has N deps not in hint:" and the +# next blank line. Only wasmtime (a true extra) should be listed; the +# primary's manifest counterpart (neovim) must not be flagged as missing. +fyi_block=$(echo "$out" | awk '/deps not in hint:/{f=1; next} f && /^$/{f=0} f') echo "$out" | grep -q 'deps not in hint:' && echo "$out" | grep -qi 'wasmtime' \ + && ! echo "$fyi_block" | grep -qx 'neovim' \ && { echo " PASS: FYI list printed"; (( PASS++ )); } \ || { echo " FAIL: FYI. out=$out"; (( FAIL++ )); ERRORS+=("T-BM16"); } rm -f "$MOCK_BASE/manifest_fixture" "$MOCK_BASE/bundle-manifests" "$MOCK_HINT/bmnvim.hint" |
