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

Function TestStringFlagDefaultText

flag_test.go:660–664  ·  flag_test.go::TestStringFlagDefaultText
(t *testing.T)

Source from the content-addressed store, hash-verified

658}
659
660func 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
666func TestStringFlagWithEnvVarHelpOutput(t *testing.T) {
667 t.Setenv("APP_FOO", "derp")

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected