diff --git a/test/activate.bats b/test/activate.bats index 9c1fc67..4a3455a 100644 --- a/test/activate.bats +++ b/test/activate.bats @@ -44,6 +44,31 @@ EOS unstub pyenv-sh-deactivate } +@test "activate virtualenv from current version with custom prompt" { + export PYENV_VIRTUALENV_INIT=1 + + stub pyenv-version-name "echo venv" + stub pyenv-virtualenv-prefix "venv : echo \"${PYENV_ROOT}/versions/venv\"" + stub pyenv-prefix "venv : echo \"${PYENV_ROOT}/versions/venv\"" + stub pyenv-sh-deactivate "--force --quiet : echo deactivated" + + PYENV_SHELL="bash" PYENV_VERSION="venv" PYENV_VIRTUALENV_PROMPT='venv:{venv}' run pyenv-sh-activate + + assert_success + assert_output <