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

Merge remote-tracking branch 'rbenv/master' into rbenv-1.0

This commit is contained in:
Yamashita, Yuu
2016-03-02 01:39:52 +00:00
26 changed files with 241 additions and 218 deletions

View File

@@ -43,27 +43,14 @@ python
OUT
}
@test "supports hook path with spaces" {
hook_path="${PYENV_TEST_DIR}/custom stuff/pyenv hooks"
mkdir -p "${hook_path}/exec"
echo "export HELLO='from hook'" > "${hook_path}/exec/hello.bash"
export PYENV_VERSION=system
PYENV_HOOK_PATH="$hook_path" run pyenv-exec env
assert_success
assert_line "HELLO=from hook"
}
@test "carries original IFS within hooks" {
hook_path="${PYENV_TEST_DIR}/pyenv.d"
mkdir -p "${hook_path}/exec"
cat > "${hook_path}/exec/hello.bash" <<SH
create_hook exec hello.bash <<SH
hellos=(\$(printf "hello\\tugly world\\nagain"))
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
SH
export PYENV_VERSION=system
PYENV_HOOK_PATH="$hook_path" IFS=$' \t\n' run pyenv-exec env
IFS=$' \t\n' run pyenv-exec env
assert_success
assert_line "HELLO=:hello:ugly:world:again"
}