MCPcopy Index your code
hub / github.com/docker/docker-agent / TestWindowsCmdExe_SystemRoot

Function TestWindowsCmdExe_SystemRoot

pkg/shellpath/shellpath_test.go:17–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15}
16
17func TestWindowsCmdExe_SystemRoot(t *testing.T) {
18 t.Setenv("ComSpec", "")
19 t.Setenv("SystemRoot", `C:\Windows`)
20 got := WindowsCmdExe()
21 want := `C:\Windows` + string(filepath.Separator) + filepath.Join("System32", "cmd.exe")
22 if got != want {
23 t.Errorf("WindowsCmdExe() = %q, want %q", got, want)
24 }
25}
26
27func TestWindowsCmdExe_Fallback(t *testing.T) {
28 t.Setenv("ComSpec", "")

Callers

nothing calls this directly

Calls 1

WindowsCmdExeFunction · 0.85

Tested by

no test coverage detected