// TestValidatePathsWindows asserts that the proper config paths are returned
// on Windows platforms
TestValidatePathsWindows asserts that the proper config paths are returned
on Windows platforms
// TestValidatePathsWindows asserts that the proper config paths are returned // on Windows platforms
func TestValidatePathsWindows(t *testing.T) {
	home := "not-used-on-windows"
	envvars := map[string]string{
		"APPDATA":     "/apps",
		"PROGRAMDATA": "/programs",
	}
	paths, err := Paths("windows", home, envvars)
	if err != nil {
		t.Errorf("paths returned an error: %v", err)
	}
	want := []string{
		"/apps/cheat/conf.yml",
		"/programs/cheat/conf.yml",
	}
	if !reflect.DeepEqual(paths, want) {
		t.Errorf(
			"failed to return expected paths: want:\n%s, got:\n%s",
			spew.Sdump(want),
			spew.Sdump(paths),
		)
	}
}
func TestValidatePathsWindows ( t * testing . T ) { home := " " envvars := map [ string ] string { " " : " " , " " : " " , } paths , err := Paths ( " " , home , envvars ) if err != nil { t . Errorf ( " " , err ) } want := [ ] string { " " , " " , } if ! reflect . DeepEqual ( paths , want ) { t . Errorf ( " \n \n " , spew . Sdump ( want ) , spew . Sdump ( paths ) , ) } }
TestValidatePathsWindows asserts that the proper config paths are returned
on Windows platforms
TestValidatePathsWindows asserts that the proper config paths are returned on Windows platforms
// mock the user's home directory // mock some envvars // get the paths for the platform // specify the expected output // assert that output matches expectations