python-build: fix prerequisite tests

This commit is contained in:
macayu17 2026-09-02 17:24:22 +05:30
parent d6c94ebd1e
commit 0c64cb93ab
3 changed files with 5 additions and 3 deletions

View file

@ -7,6 +7,7 @@
set -e
[ -n "$PYENV_DEBUG" ] && set -x
# Provide pyenv completions
if [ "$1" = "--complete" ]; then
exit
fi

View file

@ -13,9 +13,10 @@ liblzma-dev libzstd-dev"
@test "completion does not install packages" {
stub apt-get
run pyenv-install-prerequisites --complete
PATH="${BATS_TEST_DIRNAME}/../../../libexec:$PATH" \
run pyenv completions install-prerequisites
assert_success
assert_success "--help"
unstub apt-get
}

View file

@ -148,7 +148,7 @@ path_without() {
if [ "$found" != "${PYENV_ROOT}/shims" ]; then
alt="${PYENV_TEST_DIR}/$(echo "${found#/}" | tr '/' '-')"
mkdir -p "$alt"
for util in bash head cut readlink greadlink; do
for util in bash head cut readlink greadlink tr; do
if [ -x "${found}/$util" ]; then
ln -s "${found}/$util" "${alt}/$util"
fi