Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
34246f9f
Commit
34246f9f
authored
Nov 26, 2014
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have rbenv-uninstall respect `-h|--help`
parent
96d9cbe7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
bin/rbenv-uninstall
+4
-0
test/rbenv.bats
+13
-0
No files found.
bin/rbenv-uninstall
View file @
34246f9f
...
@@ -27,6 +27,10 @@ if [ -z "$RBENV_ROOT" ]; then
...
@@ -27,6 +27,10 @@ if [ -z "$RBENV_ROOT" ]; then
RBENV_ROOT
=
"
${
HOME
}
/.rbenv"
RBENV_ROOT
=
"
${
HOME
}
/.rbenv"
fi
fi
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
usage 0
fi
unset
FORCE
unset
FORCE
if
[
"
$1
"
=
"-f"
]
||
[
"
$1
"
=
"--force"
]
;
then
if
[
"
$1
"
=
"-f"
]
||
[
"
$1
"
=
"--force"
]
;
then
FORCE
=
true
FORCE
=
true
...
...
test/rbenv.bats
View file @
34246f9f
...
@@ -161,6 +161,13 @@ OUT
...
@@ -161,6 +161,13 @@ OUT
assert_output_contains 'Usage: rbenv install'
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" {
@test "not enough arguments rbenv-uninstall" {
run rbenv-uninstall
run rbenv-uninstall
assert_failure
assert_failure
...
@@ -172,3 +179,9 @@ OUT
...
@@ -172,3 +179,9 @@ OUT
assert_failure
assert_failure
assert_output_contains 'Usage: rbenv uninstall'
assert_output_contains 'Usage: rbenv uninstall'
}
}
@test "show help for rbenv-uninstall" {
run rbenv-uninstall -h
assert_success
assert_output_contains 'Usage: rbenv uninstall'
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment