#!/usr/bin/env bash ## lsphp-repo-version.test.sh — fixture test for scripts/lsphp-repo-version.sh. ## Asserts: amd64 (explicit and default) equals the OLD inline pipeline on the ## same fixture; arm64 picks from the arm64 index (fixtures deliberately differ); ## bad arch is refused. set -euo pipefail HERE=$(cd "$(dirname "$0")/.." && pwd) S="$HERE/lsphp-repo-version.sh" T=$(mktemp -d); trap 'rm -rf "$T"' EXIT mk() { # file, version-for-lsphp85 cat >"$T/$1" </dev/null 2>&1; then echo "FAIL bad arch accepted"; fail=1; else echo "ok bad arch refused"; fi exit $fail