diff options
Diffstat (limited to 'flag_test.go')
| -rw-r--r-- | flag_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/flag_test.go b/flag_test.go index 55dd6c6..09249c8 100644 --- a/flag_test.go +++ b/flag_test.go @@ -1008,6 +1008,11 @@ func TestPrintDefaults(t *testing.T) { func TestVisitAllFlagOrder(t *testing.T) { fs := NewFlagSet("TestVisitAllFlagOrder", ContinueOnError) fs.SortFlags = false + // https://github.com/spf13/pflag/issues/120 + fs.SetNormalizeFunc(func(f *FlagSet, name string) NormalizedName { + return NormalizedName(name) + }) + names := []string{"C", "B", "A", "D"} for _, name := range names { fs.Bool(name, false, "") |
