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

Use create_hook helper

Use extracted create_hook helper in tests for:

- exec
- hooks
- rehash
- version-name
- version-origin
- which
This commit is contained in:
Jason Karns
2015-12-29 11:01:10 -05:00
parent 5ccba5d7cc
commit 0f7a2cad8d
6 changed files with 23 additions and 37 deletions

View File

@@ -44,15 +44,13 @@ OUT
}
@test "carries original IFS within hooks" {
hook_path="${RBENV_TEST_DIR}/rbenv.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 RBENV_VERSION=system
RBENV_HOOK_PATH="$hook_path" IFS=$' \t\n' run rbenv-exec env
IFS=$' \t\n' run rbenv-exec env
assert_success
assert_line "HELLO=:hello:ugly:world:again"
}