star/bed/cmdline/environment_test.go
2025-04-26 19:33:14 +08:00

15 lines
239 B
Go

package cmdline
type mockEnvironment struct{}
func (*mockEnvironment) Get(key string) string {
if key == "HOME" {
return mockHomeDir
}
return ""
}
func (*mockEnvironment) List() []string {
return []string{"HOME=" + mockHomeDir}
}