1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-12 21:33:54 -05:00

fix iterating through paths that have spaces in them

Fixes #344, #196
This commit is contained in:
Mislav Marohnić
2013-02-24 14:52:50 +01:00
parent 382db59cd0
commit baf7656d2f
8 changed files with 51 additions and 6 deletions

View File

@@ -28,6 +28,18 @@ create_hook() {
assert_line 2 "${RBENV_TEST_DIR}/etc/rbenv_hooks/exec/bueno.bash"
}
@test "supports hook paths with spaces" {
path1="${RBENV_TEST_DIR}/my hooks/rbenv.d"
path2="${RBENV_TEST_DIR}/etc/rbenv hooks"
create_hook "$path1" exec "hello.bash"
create_hook "$path2" exec "ahoy.bash"
RBENV_HOOK_PATH="$path1:$path2" run rbenv-hooks exec
assert_success
assert_line 0 "${RBENV_TEST_DIR}/my hooks/rbenv.d/exec/hello.bash"
assert_line 1 "${RBENV_TEST_DIR}/etc/rbenv hooks/exec/ahoy.bash"
}
@test "resolves relative paths" {
path="${RBENV_TEST_DIR}/rbenv.d"
create_hook "$path" exec "hello.bash"