Remove TestUsage, since Usage will no longer be shown on failure to parse
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
This commit is contained in:
parent
6c3b7f1932
commit
d440ff0beb
1 changed files with 0 additions and 11 deletions
|
@ -151,17 +151,6 @@ func TestGet(t *testing.T) {
|
||||||
VisitAll(visitor)
|
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) {
|
func testParse(f *FlagSet, t *testing.T) {
|
||||||
if f.Parsed() {
|
if f.Parsed() {
|
||||||
t.Error("f.Parse() = true before Parse")
|
t.Error("f.Parse() = true before Parse")
|
||||||
|
|
Loading…
Reference in a new issue