Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
a8fc65fd
Commit
a8fc65fd
authored
Oct 13, 2015
by
ForrestWeston
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests from code-review
License: MIT Signed-off-by:
ForrestWeston
<
Forrest.Weston@gmail.com
>
parent
01239147
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
commands/cli/parse_test.go
commands/cli/parse_test.go
+4
-0
No files found.
commands/cli/parse_test.go
View file @
a8fc65fd
...
...
@@ -125,6 +125,10 @@ func TestOptionParsing(t *testing.T) {
test
(
"--bool=false foo"
,
kvs
{
"bool"
:
false
},
words
{
"foo"
})
test
(
"-b=FaLsE foo"
,
kvs
{
"b"
:
false
},
words
{
"foo"
})
test
(
"-b=TrUe foo"
,
kvs
{
"b"
:
true
},
words
{
"foo"
})
test
(
"-b true"
,
kvs
{
"b"
:
true
},
words
{
"true"
})
test
(
"-b false"
,
kvs
{
"b"
:
true
},
words
{
"false"
})
test
(
"-b --string foo bar"
,
kvs
{
"b"
:
true
,
"string"
:
"foo"
},
words
{
"bar"
})
test
(
"-b=false --string bar"
,
kvs
{
"b"
:
false
,
"string"
:
"bar"
},
words
{})
}
func
TestArgumentParsing
(
t
*
testing
.
T
)
{
...
...
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