1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 00:39:31 +08:00

Added tests from code-review

License: MIT
Signed-off-by: ForrestWeston <Forrest.Weston@gmail.com>
This commit is contained in:
ForrestWeston
2015-10-13 17:09:43 -07:00
parent 01239147b7
commit a8fc65fda0

View File

@ -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) {