aboutsummaryrefslogtreecommitdiff
path: root/flag_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'flag_test.go')
-rw-r--r--flag_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/flag_test.go b/flag_test.go
index aa2f434..ead0518 100644
--- a/flag_test.go
+++ b/flag_test.go
@@ -100,6 +100,12 @@ func TestEverything(t *testing.T) {
}
}
+func TestNoArgument(t *testing.T) {
+ if GetCommandLine().Parse([]string{}) != nil {
+ t.Error("parse failed for empty argument list")
+ }
+}
+
func TestUsage(t *testing.T) {
called := false
ResetForTesting(func() { called = true })