(t *testing.T)
| 664 | } |
| 665 | |
| 666 | func TestStringFlagWithEnvVarHelpOutput(t *testing.T) { |
| 667 | t.Setenv("APP_FOO", "derp") |
| 668 | |
| 669 | for _, test := range stringFlagTests { |
| 670 | fl := &StringFlag{Name: test.name, Aliases: test.aliases, Value: test.value, Sources: EnvVars("APP_FOO")} |
| 671 | output := fl.String() |
| 672 | |
| 673 | expectedSuffix := withEnvHint([]string{"APP_FOO"}, "") |
| 674 | if !strings.HasSuffix(output, expectedSuffix) { |
| 675 | t.Errorf("%s does not end with"+expectedSuffix, output) |
| 676 | } |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | var _ = []struct { |
| 681 | name string |
nothing calls this directly
no test coverage detected