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

Function TestFloat64SliceFlagWithEnvVarHelpOutput

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

Source from the content-addressed store, hash-verified

1554}
1555
1556func TestFloat64SliceFlagWithEnvVarHelpOutput(t *testing.T) {
1557 t.Setenv("APP_SMURF", "0.1234,-10.5")
1558 for _, test := range float64SliceFlagTests {
1559 fl := FloatSliceFlag{Name: test.name, Value: test.value, Sources: EnvVars("APP_SMURF")}
1560 output := fl.String()
1561
1562 expectedSuffix := withEnvHint([]string{"APP_SMURF"}, "")
1563 if !strings.HasSuffix(output, expectedSuffix) {
1564 t.Errorf("%q does not end with"+expectedSuffix, output)
1565 }
1566 }
1567}
1568
1569func TestFloat64SliceFlagApply_SetsAllNames(t *testing.T) {
1570 fl := FloatSliceFlag{Name: "bits", Aliases: []string{"B", "bips"}}

Callers

nothing calls this directly

Calls 3

EnvVarsFunction · 0.85
withEnvHintFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected