1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-16 15:23:53 -05:00

Add test for /bin/python case

This commit is contained in:
Yamashita, Yuu
2016-08-01 00:19:04 +00:00
parent 4df7cf2dd6
commit 5c83c4abb7
2 changed files with 10 additions and 1 deletions

View File

@@ -24,6 +24,15 @@ load test_helper
assert_success "$PYENV_TEST_DIR"
}
@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"
PYENV_VERSION="system" run pyenv-prefix
assert_success "/"
}
@test "prefix for invalid system" {
PATH="$(path_without python)" run pyenv-prefix system
assert_failure "pyenv: system version not found in PATH"