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

Function TestDetectShell_Unix

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

Source from the content-addressed store, hash-verified

34}
35
36func TestDetectShell_Unix(t *testing.T) {
37 if runtime.GOOS == "windows" {
38 t.Skip("Unix-only test")
39 }
40
41 t.Setenv("SHELL", "/bin/zsh")
42 shell, args := DetectShell()
43 if shell != "/bin/zsh" {
44 t.Errorf("DetectShell() shell = %q, want /bin/zsh", shell)
45 }
46 if len(args) != 1 || args[0] != "-c" {
47 t.Errorf("DetectShell() args = %v, want [-c]", args)
48 }
49}
50
51func TestDetectShell_Unix_Fallback(t *testing.T) {
52 if runtime.GOOS == "windows" {

Callers

nothing calls this directly

Calls 1

DetectShellFunction · 0.85

Tested by

no test coverage detected