From a8fc65fda014839a3de688208aa899109d22f422 Mon Sep 17 00:00:00 2001 From: ForrestWeston Date: Tue, 13 Oct 2015 17:09:43 -0700 Subject: [PATCH] Added tests from code-review License: MIT Signed-off-by: ForrestWeston --- commands/cli/parse_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/cli/parse_test.go b/commands/cli/parse_test.go index c02ac9f4d..5564b3b58 100644 --- a/commands/cli/parse_test.go +++ b/commands/cli/parse_test.go @@ -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) {