mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-14 14:23:53 -05:00
Merge pull request #1002 from blueyed/fix-which-tests-PATH
test/which.bats: do not export PATH
This commit is contained in:
@@ -57,12 +57,11 @@ create_executable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "doesn't include current directory in PATH search" {
|
@test "doesn't include current directory in PATH search" {
|
||||||
export PATH="$(path_without "kill-all-humans")"
|
|
||||||
mkdir -p "$RBENV_TEST_DIR"
|
mkdir -p "$RBENV_TEST_DIR"
|
||||||
cd "$RBENV_TEST_DIR"
|
cd "$RBENV_TEST_DIR"
|
||||||
touch kill-all-humans
|
touch kill-all-humans
|
||||||
chmod +x kill-all-humans
|
chmod +x kill-all-humans
|
||||||
RBENV_VERSION=system run rbenv-which kill-all-humans
|
PATH="$(path_without "kill-all-humans")" RBENV_VERSION=system run rbenv-which kill-all-humans
|
||||||
assert_failure "rbenv: kill-all-humans: command not found"
|
assert_failure "rbenv: kill-all-humans: command not found"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,8 +78,7 @@ create_executable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "no executable found for system version" {
|
@test "no executable found for system version" {
|
||||||
export PATH="$(path_without "rake")"
|
PATH="$(path_without "rake")" RBENV_VERSION=system run rbenv-which rake
|
||||||
RBENV_VERSION=system run rbenv-which rake
|
|
||||||
assert_failure "rbenv: rake: command not found"
|
assert_failure "rbenv: rake: command not found"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user