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

Function TestDetectShell_Unix_Fallback

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

Source from the content-addressed store, hash-verified

49}
50
51func TestDetectShell_Unix_Fallback(t *testing.T) {
52 if runtime.GOOS == "windows" {
53 t.Skip("Unix-only test")
54 }
55
56 t.Setenv("SHELL", "")
57 shell, _ := DetectShell()
58 if shell != "/bin/sh" {
59 t.Errorf("DetectShell() shell = %q, want /bin/sh", shell)
60 }
61}
62
63func TestDefaultUnixShell(t *testing.T) {
64 t.Setenv("SHELL", "/usr/local/bin/fish")

Callers

nothing calls this directly

Calls 1

DetectShellFunction · 0.85

Tested by

no test coverage detected