1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-13 05:43:53 -05:00

Import changes from ruby-build v20150818

This commit is contained in:
Yamashita, Yuu
2015-08-25 15:37:31 +09:00
parent 0c81c97926
commit 0f288f2462
5 changed files with 53 additions and 17 deletions

View File

@@ -2,7 +2,7 @@
load test_helper
@test "not enought arguments for python-build" {
@test "not enough arguments for python-build" {
# use empty inline definition so nothing gets built anyway
local definition="${TMP}/build-definition"
echo '' > "$definition"

View File

@@ -149,39 +149,61 @@ OUT
@test "not enough arguments for pyenv-install" {
stub_python_build
stub pyenv-help 'install : true'
run pyenv-install
assert_failure
assert_output_contains 'Usage: pyenv install'
unstub pyenv-help
}
@test "too many arguments for pyenv-install" {
stub_python_build
stub pyenv-help 'install : true'
run pyenv-install 3.4.1 3.4.2
assert_failure
assert_output_contains 'Usage: pyenv install'
unstub pyenv-help
}
@test "show help for pyenv-install" {
stub_python_build
stub pyenv-help 'install : true'
run pyenv-install -h
assert_success
unstub pyenv-help
}
@test "pyenv-install has usage help preface" {
run head "$(which pyenv-install)"
assert_output_contains 'Usage: pyenv install'
}
@test "not enough arguments pyenv-uninstall" {
stub pyenv-help 'uninstall : true'
run pyenv-uninstall
assert_failure
assert_output_contains 'Usage: pyenv uninstall'
unstub pyenv-help
}
@test "too many arguments for pyenv-uninstall" {
stub pyenv-help 'uninstall : true'
run pyenv-uninstall 3.4.1 3.4.2
assert_failure
assert_output_contains 'Usage: pyenv uninstall'
unstub pyenv-help
}
@test "show help for pyenv-uninstall" {
stub pyenv-help 'uninstall : true'
run pyenv-uninstall -h
assert_success
unstub pyenv-help
}
@test "pyenv-uninstall has usage help preface" {
run head "$(which pyenv-uninstall)"
assert_output_contains 'Usage: pyenv uninstall'
}