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

Function TestCommandCall

core/os/shell/command_test.go:91–97  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

89}
90
91func TestCommandCall(t *testing.T) {
92 const expect = "echo to stdout"
93 ctx := log.Testing(t)
94 output, err := shell.Command("echo", "echo to stdout").Call(ctx)
95 assert.For(ctx, "err").ThatError(err).Succeeded()
96 assert.For(ctx, "output").ThatString(output).Equals(expect)
97}
98
99func TestCommandEnvironment(t *testing.T) {
100 const expect = "message from environment\n"

Callers

nothing calls this directly

Calls 7

SucceededMethod · 0.80
ThatErrorMethod · 0.80
ForMethod · 0.80
ThatStringMethod · 0.80
CallMethod · 0.65
CommandMethod · 0.65
EqualsMethod · 0.65

Tested by

no test coverage detected