aboutsummaryrefslogtreecommitdiff
path: root/flag_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'flag_test.go')
-rw-r--r--flag_test.go38
1 files changed, 20 insertions, 18 deletions
diff --git a/flag_test.go b/flag_test.go
index 86b37e5..1befb94 100644
--- a/flag_test.go
+++ b/flag_test.go
@@ -874,23 +874,24 @@ func TestHiddenFlagUsage(t *testing.T) {
}
}
-const defaultOutput = ` --A for bootstrapping, allow 'any' type
- --Alongflagname disable bounds checking
- -C, --CCC a boolean defaulting to true (default true)
- --D path set relative path for local imports
- --F number a non-zero number (default 2.7)
- --G float a float that defaults to zero
- --IP ip IP address with no default
- --IPMask ipMask Netmask address with no default
- --IPNet ipNet IP network with no default
- --Ints intSlice int slice with zero default
- --N int a non-zero int (default 27)
- --ND1 string[="bar"] a string with NoOptDefVal (default "foo")
- --ND2 num[=4321] a num with NoOptDefVal (default 1234)
- --Strings stringSlice string slice with zero default
- --Z int an int that defaults to zero
- --custom custom custom Value implementation
- --maxT timeout set timeout for dial
+const defaultOutput = ` --A for bootstrapping, allow 'any' type
+ --Alongflagname disable bounds checking
+ -C, --CCC a boolean defaulting to true (default true)
+ --D path set relative path for local imports
+ --F number a non-zero number (default 2.7)
+ --G float a float that defaults to zero
+ --IP ip IP address with no default
+ --IPMask ipMask Netmask address with no default
+ --IPNet ipNet IP network with no default
+ --Ints intSlice int slice with zero default
+ --N int a non-zero int (default 27)
+ --ND1 string[="bar"] a string with NoOptDefVal (default "foo")
+ --ND2 num[=4321] a num with NoOptDefVal (default 1234)
+ --StringArray stringArray string array with zero default
+ --StringSlice stringSlice string slice with zero default
+ --Z int an int that defaults to zero
+ --custom custom custom Value implementation
+ --maxT timeout set timeout for dial
`
// Custom value that satisfies the Value interface.
@@ -927,7 +928,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.StringSlice("Strings", []string{}, "string slice with zero default")
+ fs.StringSlice("StringSlice", []string{}, "string slice with zero default")
+ fs.StringArray("StringArray", []string{}, "string array with zero default")
var cv customValue
fs.Var(&cv, "custom", "custom Value implementation")