MCPcopy
hub / github.com/urfave/cli / TestUint64FlagWithEnvVarHelpOutput

Function TestUint64FlagWithEnvVarHelpOutput

flag_test.go:978–990  ·  flag_test.go::TestUint64FlagWithEnvVarHelpOutput
(t *testing.T)

Source from the content-addressed store, hash-verified

976}
977
978func TestUint64FlagWithEnvVarHelpOutput(t *testing.T) {
979 t.Setenv("APP_BAR", "2")
980
981 for _, test := range uint64FlagTests {
982 fl := &Uint64Flag{Name: test.name, Sources: EnvVars("APP_BAR")}
983 output := fl.String()
984
985 expectedSuffix := withEnvHint([]string{"APP_BAR"}, "")
986 if !strings.HasSuffix(output, expectedSuffix) {
987 t.Errorf("%s does not end with"+expectedSuffix, output)
988 }
989 }
990}
991
992func TestUint64FlagValueFromCommand(t *testing.T) {
993 f := &Uint64Flag{Name: "myflag"}

Callers

nothing calls this directly

Calls 3

EnvVarsFunction · 0.85
withEnvHintFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected