(t *testing.T)
| 658 | } |
| 659 | |
| 660 | func TestStringFlagDefaultText(t *testing.T) { |
| 661 | fl := &StringFlag{Name: "foo", Aliases: nil, Usage: "amount of `foo` requested", Value: "none", DefaultText: "all of it"} |
| 662 | expected := "--foo foo\tamount of foo requested (default: all of it)" |
| 663 | assert.Equal(t, expected, fl.String()) |
| 664 | } |
| 665 | |
| 666 | func TestStringFlagWithEnvVarHelpOutput(t *testing.T) { |
| 667 | t.Setenv("APP_FOO", "derp") |