diff options
Diffstat (limited to 'flag_test.go')
| -rw-r--r-- | flag_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/flag_test.go b/flag_test.go index 172d49f..8248277 100644 --- a/flag_test.go +++ b/flag_test.go @@ -936,6 +936,7 @@ const defaultOutput = ` --A for bootstrapping, allo --Alongflagname disable bounds checking -C, --CCC a boolean defaulting to true (default true) --D path set relative path for local imports + -E, --EEE num[=1234] a num with NoOptDefVal (default 4321) --F number a non-zero number (default 2.7) --G float a float that defaults to zero --IP ip IP address with no default @@ -987,6 +988,8 @@ func TestPrintDefaults(t *testing.T) { fs.Lookup("ND1").NoOptDefVal = "bar" fs.Int("ND2", 1234, "a `num` with NoOptDefVal") fs.Lookup("ND2").NoOptDefVal = "4321" + fs.IntP("EEE", "E", 4321, "a `num` with NoOptDefVal") + fs.ShorthandLookup("E").NoOptDefVal = "1234" fs.StringSlice("StringSlice", []string{}, "string slice with zero default") fs.StringArray("StringArray", []string{}, "string array with zero default") |
