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

Function TestUint64SliceFlagWithEnvVarHelpOutput

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

Source from the content-addressed store, hash-verified

1359}
1360
1361func TestUint64SliceFlagWithEnvVarHelpOutput(t *testing.T) {
1362 t.Setenv("APP_SMURF", "42,17179869184")
1363
1364 for _, test := range uint64SliceFlagTests {
1365 fl := Uint64SliceFlag{Name: test.name, Value: test.value, Sources: EnvVars("APP_SMURF")}
1366 output := fl.String()
1367
1368 expectedSuffix := withEnvHint([]string{"APP_SMURF"}, "")
1369 if !strings.HasSuffix(output, expectedSuffix) {
1370 t.Errorf("%q does not end with"+expectedSuffix, output)
1371 }
1372 }
1373}
1374
1375func TestUint64SliceFlagApply_SetsAllNames(t *testing.T) {
1376 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