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

test that IFS in hooks is correct

closes #379
This commit is contained in:
Mislav Marohnić
2013-04-16 14:01:04 +02:00
parent 6ca591ab75
commit 060f141b21
3 changed files with 42 additions and 0 deletions

View File

@@ -58,3 +58,17 @@ The \`rspec' command exists in these Ruby versions:
2.0
OUT
}
@test "carries original IFS within hooks" {
hook_path="${RBENV_TEST_DIR}/rbenv.d"
mkdir -p "${hook_path}/which"
cat > "${hook_path}/which/hello.bash" <<SH
hellos=(\$(printf "hello\\tugly world\\nagain"))
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
exit
SH
RBENV_HOOK_PATH="$hook_path" IFS=$' \t\n' run rbenv-which anything
assert_success
assert_output "HELLO=:hello:ugly:world:again"
}