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

Function TestUintSliceFlagWithEnvVarHelpOutput

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

Source from the content-addressed store, hash-verified

1211}
1212
1213func TestUintSliceFlagWithEnvVarHelpOutput(t *testing.T) {
1214 t.Setenv("APP_SMURF", "42,17179869184")
1215
1216 for _, test := range uintSliceFlagTests {
1217 fl := &Uint64SliceFlag{Name: test.name, Value: test.value, Sources: EnvVars("APP_SMURF")}
1218 output := fl.String()
1219
1220 expectedSuffix := withEnvHint([]string{"APP_SMURF"}, "")
1221 if !strings.HasSuffix(output, expectedSuffix) {
1222 t.Errorf("%q does not end with"+expectedSuffix, output)
1223 }
1224 }
1225}
1226
1227func TestUintSliceFlagApply_SetsAllNames(t *testing.T) {
1228 fl := &Uint64SliceFlag{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