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

Function TestFloat64FlagWithEnvVarHelpOutput

flag_test.go:1495–1507  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1493}
1494
1495func TestFloat64FlagWithEnvVarHelpOutput(t *testing.T) {
1496 t.Setenv("APP_BAZ", "99.4")
1497
1498 for _, test := range float64FlagTests {
1499 fl := &FloatFlag{Name: test.name, Sources: EnvVars("APP_BAZ")}
1500 output := fl.String()
1501
1502 expectedSuffix := withEnvHint([]string{"APP_BAZ"}, "")
1503 if !strings.HasSuffix(output, expectedSuffix) {
1504 t.Errorf("%s does not end with"+expectedSuffix, output)
1505 }
1506 }
1507}
1508
1509func TestFloat64FlagApply_SetsAllNames(t *testing.T) {
1510 v := 99.1

Callers

nothing calls this directly

Calls 3

EnvVarsFunction · 0.85
withEnvHintFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected