diff --git a/test/init.bats b/test/init.bats index 273114d6..16314d76 100755 --- a/test/init.bats +++ b/test/init.bats @@ -35,12 +35,12 @@ create_executable() { assert_line "command pyenv rehash 2>/dev/null" } - @test "setup shell completions" { root="$(cd $BATS_TEST_DIRNAME/.. && pwd)" + export PYENV_ROOT=$root run pyenv-init - bash assert_success - assert_line "source '${root}/test/../libexec/../completions/pyenv.bash'" + assert_line "source '${root}/completions/pyenv.bash'" } @test "detect parent shell" { @@ -64,9 +64,10 @@ OUT @test "setup shell completions (fish)" { root="$(cd $BATS_TEST_DIRNAME/.. && pwd)" + export PYENV_ROOT=$root run pyenv-init - fish assert_success - assert_line "source '${root}/test/../libexec/../completions/pyenv.fish'" + assert_line "source '${root}/completions/pyenv.fish'" } @test "fish instructions" {