mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Add test for not including current directory in PATH search
Confirms #836
This commit is contained in:
parent
dc23ef10b6
commit
90373d78b9
1 changed files with 10 additions and 0 deletions
|
@ -56,6 +56,16 @@ create_executable() {
|
|||
assert_success "${RBENV_TEST_DIR}/bin/kill-all-humans"
|
||||
}
|
||||
|
||||
@test "doesn't include current directory in PATH search" {
|
||||
export PATH="$(path_without "kill-all-humans")"
|
||||
mkdir -p "$RBENV_TEST_DIR"
|
||||
cd "$RBENV_TEST_DIR"
|
||||
touch kill-all-humans
|
||||
chmod +x kill-all-humans
|
||||
RBENV_VERSION=system run rbenv-which kill-all-humans
|
||||
assert_failure "rbenv: kill-all-humans: command not found"
|
||||
}
|
||||
|
||||
@test "version not installed" {
|
||||
create_executable "2.0" "rspec"
|
||||
RBENV_VERSION=1.9 run rbenv-which rspec
|
||||
|
|
Loading…
Reference in a new issue