tests: fix integration tests for Bash and Fish

This commit is contained in:
Ivan Pozdeev 2025-12-20 21:57:39 +03:00 committed by Ivan Pozdeev
parent 5855d9dfca
commit 7998159daa
No known key found for this signature in database
GPG Key ID: FB6A628DCF06DCD7

View File

@ -109,7 +109,7 @@ hash -r 2>/dev/null || true"
@test "sh-rehash in bash (integration)" { @test "sh-rehash in bash (integration)" {
create_alt_executable_in_version "3.4" "python" create_alt_executable_in_version "3.4" "python"
run eval "$(pyenv-sh-rehash)" PYENV_SHELL=bash run eval "$(pyenv-sh-rehash)"
assert_success assert_success
assert [ -x "${PYENV_ROOT}/shims/python" ] assert [ -x "${PYENV_ROOT}/shims/python" ]
} }
@ -123,7 +123,7 @@ hash -r 2>/dev/null || true"
@test "sh-rehash in fish (integration)" { @test "sh-rehash in fish (integration)" {
command -v fish >/dev/null || skip "-- fish not installed" command -v fish >/dev/null || skip "-- fish not installed"
create_alt_executable_in_version "3.4" "python" create_alt_executable_in_version "3.4" "python"
run fish -Nc "eval (pyenv-sh-rehash)" PYENV_SHELL=fish fish -Nc "source (pyenv-sh-rehash | psub)"
assert_success assert_success
assert [ -x "${PYENV_ROOT}/shims/python" ] assert [ -x "${PYENV_ROOT}/shims/python" ]
} }