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

Function TestEnvVars

value_source_test.go:64–74  ·  value_source_test.go::TestEnvVars
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestEnvVars(t *testing.T) {
65 t.Setenv("myfoo", "mybar")
66
67 source := EnvVars("foo1", "myfoo")
68 str, src, ok := source.LookupWithSource()
69
70 r := require.New(t)
71 r.True(ok)
72 r.Equal(str, "mybar")
73 r.Contains(src.String(), "\"myfoo\"")
74}
75
76func TestFileValueSource(t *testing.T) {
77 t.Run("implements ValueSource", func(t *testing.T) {

Callers

nothing calls this directly

Calls 3

EnvVarsFunction · 0.85
LookupWithSourceMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected