MCPcopy Create free account
hub / github.com/openclaw/gogcli / TestHelpDescription

Function TestHelpDescription

internal/cmd/root_more_test.go:71–86  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestHelpDescription(t *testing.T) {
72 setTestConfigHome(t)
73 t.Setenv("GOG_KEYRING_BACKEND", "auto")
74
75 runtime := normalizedRuntime(newDefaultRuntime())
76 if err := bindRuntimeLayoutResolver(runtime, ""); err != nil {
77 t.Fatalf("bindRuntimeLayoutResolver: %v", err)
78 }
79 out := helpDescription(runtime)
80 if !strings.Contains(out, "Config:") {
81 t.Fatalf("expected config block, got: %q", out)
82 }
83 if !strings.Contains(out, "keyring backend: auto") {
84 t.Fatalf("expected keyring backend line, got: %q", out)
85 }
86}
87
88func TestRootHomeFlagOverridesPathRoot(t *testing.T) {
89 setTestConfigHome(t)

Callers

nothing calls this directly

Calls 5

setTestConfigHomeFunction · 0.85
normalizedRuntimeFunction · 0.85
newDefaultRuntimeFunction · 0.85
helpDescriptionFunction · 0.85

Tested by

no test coverage detected