mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-15 06:43:53 -05:00
Merge remote-tracking branch 'rbenv/master' into rbenv-20180402
This commit is contained in:
@@ -2,6 +2,17 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
@test "shell integration disabled" {
|
||||
run rbenv shell
|
||||
assert_failure "rbenv: shell integration not enabled. Run \`rbenv init' for instructions."
|
||||
}
|
||||
|
||||
@test "shell integration enabled" {
|
||||
eval "$(rbenv init -)"
|
||||
run rbenv shell
|
||||
assert_success "rbenv: no shell-specific version configured"
|
||||
}
|
||||
|
||||
@test "no shell version" {
|
||||
mkdir -p "${PYENV_TEST_DIR}/myproject"
|
||||
cd "${PYENV_TEST_DIR}/myproject"
|
||||
|
||||
@@ -9,7 +9,7 @@ setup() {
|
||||
|
||||
create_file() {
|
||||
mkdir -p "$(dirname "$1")"
|
||||
touch "$1"
|
||||
echo "system" > "$1"
|
||||
}
|
||||
|
||||
@test "detects global 'version' file" {
|
||||
|
||||
@@ -26,7 +26,7 @@ setup() {
|
||||
}
|
||||
|
||||
@test "detects local file" {
|
||||
touch .python-version
|
||||
echo "system" > .python-version
|
||||
run pyenv-version-origin
|
||||
assert_success "${PWD}/.python-version"
|
||||
}
|
||||
|
||||
@@ -60,12 +60,11 @@ create_executable() {
|
||||
}
|
||||
|
||||
@test "doesn't include current directory in PATH search" {
|
||||
export PATH="$(path_without "kill-all-humans")"
|
||||
mkdir -p "$PYENV_TEST_DIR"
|
||||
cd "$PYENV_TEST_DIR"
|
||||
touch kill-all-humans
|
||||
chmod +x kill-all-humans
|
||||
PYENV_VERSION=system run pyenv-which kill-all-humans
|
||||
PATH="$(path_without "kill-all-humans")" PYENV_VERSION=system run pyenv-which kill-all-humans
|
||||
assert_failure "pyenv: kill-all-humans: command not found"
|
||||
}
|
||||
|
||||
@@ -91,9 +90,8 @@ OUT
|
||||
}
|
||||
|
||||
@test "no executable found for system version" {
|
||||
export PATH="$(path_without "py.test")"
|
||||
PYENV_VERSION=system run pyenv-which py.test
|
||||
assert_failure "pyenv: py.test: command not found"
|
||||
PATH="$(path_without "rake")" PYENV_VERSION=system run pyenv-which rake
|
||||
assert_failure "pyenv: rake: command not found"
|
||||
}
|
||||
|
||||
@test "executable found in other versions" {
|
||||
|
||||
Reference in New Issue
Block a user