Commit 34246f9f by Mislav Marohnić

Have rbenv-uninstall respect `-h|--help`

parent 96d9cbe7
......@@ -27,6 +27,10 @@ if [ -z "$RBENV_ROOT" ]; then
RBENV_ROOT="${HOME}/.rbenv"
fi
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
usage 0
fi
unset FORCE
if [ "$1" = "-f" ] || [ "$1" = "--force" ]; then
FORCE=true
......
......@@ -161,6 +161,13 @@ OUT
assert_output_contains 'Usage: rbenv install'
}
@test "show help for rbenv-install" {
stub_ruby_build
run rbenv-install -h
assert_success
assert_output_contains 'Usage: rbenv install'
}
@test "not enough arguments rbenv-uninstall" {
run rbenv-uninstall
assert_failure
......@@ -172,3 +179,9 @@ OUT
assert_failure
assert_output_contains 'Usage: rbenv uninstall'
}
@test "show help for rbenv-uninstall" {
run rbenv-uninstall -h
assert_success
assert_output_contains 'Usage: rbenv uninstall'
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment