From bb1bfae794d3eeed1fa12998639faae321a6a66b Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Thu, 4 Sep 2014 16:49:01 -0400 Subject: [PATCH] Remove TestUsage, since Usage will no longer be shown on failure to parse Docker-DCO-1.1-Signed-off-by: Dan Walsh (github: rhatdan) Upstream-commit: 4dc962d09a05b5422c692f4762a32c24cb506e6b Component: engine --- components/engine/pkg/mflag/flag_test.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/components/engine/pkg/mflag/flag_test.go b/components/engine/pkg/mflag/flag_test.go index 622e8a9bfc..b8c0b305d4 100644 --- a/components/engine/pkg/mflag/flag_test.go +++ b/components/engine/pkg/mflag/flag_test.go @@ -151,17 +151,6 @@ func TestGet(t *testing.T) { VisitAll(visitor) } -func TestUsage(t *testing.T) { - called := false - ResetForTesting(func() { called = true }) - if CommandLine.Parse([]string{"-x"}) == nil { - t.Error("parse did not fail for unknown flag") - } - if !called { - t.Error("did not call Usage for unknown flag") - } -} - func testParse(f *FlagSet, t *testing.T) { if f.Parsed() { t.Error("f.Parse() = true before Parse")