mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Keep using original PATH ordering in test_helper
This commit is contained in:
parent
5c83c4abb7
commit
b8885e4fe2
2 changed files with 6 additions and 5 deletions
|
@ -25,12 +25,13 @@ load test_helper
|
|||
}
|
||||
|
||||
@test "prefix for system in /" {
|
||||
mkdir -p "${PYENV_TEST_DIR}/bin"
|
||||
touch "${PYENV_TEST_DIR}/bin/pyenv-which"
|
||||
echo "echo /bin/python" >"${PYENV_TEST_DIR}/bin/pyenv-which"
|
||||
chmod +x "${PYENV_TEST_DIR}/bin/pyenv-which"
|
||||
mkdir -p "${BATS_TEST_DIRNAME}/libexec"
|
||||
touch "${BATS_TEST_DIRNAME}/libexec/pyenv-which"
|
||||
echo "echo /bin/python" >"${BATS_TEST_DIRNAME}/libexec/pyenv-which"
|
||||
chmod +x "${BATS_TEST_DIRNAME}/libexec/pyenv-which"
|
||||
PYENV_VERSION="system" run pyenv-prefix
|
||||
assert_success "/"
|
||||
rm -f "${BATS_TEST_DIRNAME}/libexec/pyenv-which"
|
||||
}
|
||||
|
||||
@test "prefix for invalid system" {
|
||||
|
|
|
@ -20,10 +20,10 @@ if [ -z "$PYENV_TEST_DIR" ]; then
|
|||
export PYENV_HOOK_PATH="${PYENV_ROOT}/pyenv.d"
|
||||
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
PATH="${PYENV_TEST_DIR}/bin:$PATH"
|
||||
PATH="${BATS_TEST_DIRNAME}/../libexec:$PATH"
|
||||
PATH="${BATS_TEST_DIRNAME}/libexec:$PATH"
|
||||
PATH="${PYENV_ROOT}/shims:$PATH"
|
||||
PATH="${PYENV_TEST_DIR}/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
for xdg_var in `env 2>/dev/null | grep ^XDG_ | cut -d= -f1`; do unset "$xdg_var"; done
|
||||
|
|
Loading…
Reference in a new issue