MCPcopy Create free account
hub / github.com/google/gapid / TestEnvAddPathEnd

Function TestEnvAddPathEnd

core/os/shell/env_test.go:88–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func TestEnvAddPathEnd(t *testing.T) {
89 assert, env := assert.To(t), shell.NewEnv()
90 env.PathListSeparator = ':'
91 env.Set("aaa", "xxx").
92 Set("bbb", "").
93 Set("ccc", "yyy")
94
95 env.AddPathEnd("aaa", "/blah", "/halb").
96 AddPathEnd("bbb", "/blah", "/halb").
97 AddPathEnd("ccc", "/blah", "/halb").
98 AddPathEnd("ddd", "/blah", "/halb")
99
100 assert.For("Vars").ThatSlice(env.Vars()).Equals([]string{
101 "aaa=xxx:/blah:/halb",
102 "bbb=/blah:/halb",
103 "ccc=yyy:/blah:/halb",
104 "ddd=/blah:/halb",
105 })
106}

Callers

nothing calls this directly

Calls 8

SetMethod · 0.95
AddPathEndMethod · 0.95
VarsMethod · 0.95
NewEnvMethod · 0.80
ThatSliceMethod · 0.80
ForMethod · 0.80
SetMethod · 0.65
EqualsMethod · 0.65

Tested by

no test coverage detected