1) Remove useless touch 2) Add explicit shebang line to executable for testing

This commit is contained in:
Yamashita, Yuu 2016-08-03 01:34:42 +00:00
parent b8885e4fe2
commit 1b35cfaa2c

View file

@ -26,8 +26,9 @@ load test_helper
@test "prefix for system in /" { @test "prefix for system in /" {
mkdir -p "${BATS_TEST_DIRNAME}/libexec" mkdir -p "${BATS_TEST_DIRNAME}/libexec"
touch "${BATS_TEST_DIRNAME}/libexec/pyenv-which" { echo "#!/bin/sh"
echo "echo /bin/python" >"${BATS_TEST_DIRNAME}/libexec/pyenv-which" echo "echo /bin/python"
} >"${BATS_TEST_DIRNAME}/libexec/pyenv-which"
chmod +x "${BATS_TEST_DIRNAME}/libexec/pyenv-which" chmod +x "${BATS_TEST_DIRNAME}/libexec/pyenv-which"
PYENV_VERSION="system" run pyenv-prefix PYENV_VERSION="system" run pyenv-prefix
assert_success "/" assert_success "/"