Problem
There are no automated tests for the resolve or verify helper functions. Testing currently requires manual integration testing with live GitHub/npm/luarocks APIs, making regressions hard to catch.
Proposal
Add a shell test framework (e.g. bats-core) with unit tests for:
normalize_version edge cases (v-prefix, luarocks suffix, plain versions)
validate_sha256 (valid hashes, invalid hashes, empty strings)
resolve_local (pinned override vs. current value)
check in verify.sh (tool present, tool missing, version mismatch)
Integration tests for the full resolve pipeline can be added separately if needed.
Context
Flagged by both reviews. The shared library functions in scripts/lib/ are the most testable and highest-value targets.
Problem
There are no automated tests for the resolve or verify helper functions. Testing currently requires manual integration testing with live GitHub/npm/luarocks APIs, making regressions hard to catch.
Proposal
Add a shell test framework (e.g. bats-core) with unit tests for:
normalize_versionedge cases (v-prefix, luarocks suffix, plain versions)validate_sha256(valid hashes, invalid hashes, empty strings)resolve_local(pinned override vs. current value)checkin verify.sh (tool present, tool missing, version mismatch)Integration tests for the full resolve pipeline can be added separately if needed.
Context
Flagged by both reviews. The shared library functions in
scripts/lib/are the most testable and highest-value targets.