test use of --version

This commit is contained in:
Alex Flint 2019-05-02 09:47:39 -07:00
parent 93fcb0e87d
commit a68d6000b6
1 changed files with 7 additions and 0 deletions

View File

@ -1011,3 +1011,10 @@ func TestReuseParser(t *testing.T) {
err = p.Parse([]string{})
assert.Error(t, err)
}
func TestVersion(t *testing.T) {
var args struct{}
err := parse("--version", &args)
assert.Equal(t, ErrVersion, err)
}