func TestConfigWindows(t *testing.T) { os.Setenv("APPDATA", appdata) defer os.Unsetenv("APPDATA") config := gohome.Config(appName) assert.NotEmpty(t, config) assert.Equal(t, appdata+appName, config) }
func TestConfigXdgSet(t *testing.T) { xdgConfig := home + "/.xdgconfig/" os.Setenv("XDG_CONFIG_HOME", xdgConfig) defer os.Unsetenv("XDG_CONFIG_HOME") config := gohome.Config(appName) assert.NotEmpty(t, config) assert.Equal(t, xdgConfig+appName, config) }
func TestConfig(t *testing.T) { config := gohome.Config(appName) assert.NotEmpty(t, config) assert.Equal(t, home+"/Library/Application Support/"+appName, config) }
func TestConfigXdgUnset(t *testing.T) { config := gohome.Config(appName) assert.NotEmpty(t, config) assert.Equal(t, home+"/.config/"+appName, config) }