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

Function TestDefaultUnixShell

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

Source from the content-addressed store, hash-verified

61}
62
63func TestDefaultUnixShell(t *testing.T) {
64 t.Setenv("SHELL", "/usr/local/bin/fish")
65 got := defaultUnixShell()
66 if got != "/usr/local/bin/fish" {
67 t.Errorf("defaultUnixShell() = %q, want /usr/local/bin/fish", got)
68 }
69
70 t.Setenv("SHELL", "")
71 got = defaultUnixShell()
72 if got != "/bin/sh" {
73 t.Errorf("defaultUnixShell() = %q, want /bin/sh", got)
74 }
75}
76
77func TestWindowsCmdExe_PrefersComSpecOverSystemRoot(t *testing.T) {
78 // When both are set, ComSpec should take priority

Callers

nothing calls this directly

Calls 1

defaultUnixShellFunction · 0.85

Tested by

no test coverage detected