func TestPathConfigExists(t *testing.T) {

	// initialize a temporary config file
	confFile, err := ioutil.TempFile("", "cheat-test")
	if err != nil {
		t.Errorf("failed to create temp file: %v", err)
	}

	// clean up the temp file
	defer os.Remove(confFile.Name())

	// package cheatpaths
	paths := []string{
		"/cheat-test-conf-does-not-exist",
		confFile.Name(),
	}

	// assert
	got, err := Path(paths)
	if err != nil {
		t.Errorf("failed to identify config file: %v", err)
	}
	if got != confFile.Name() {
		t.Errorf(
			"failed to return config path: want: %s, got: %s",
			confFile.Name(),
			got,
		)
	}
}
// TestPathConfigExists asserts that `Path` identifies existent config files
TestPathConfigExists asserts that `Path` identifies existent config files
// TestPathConfigExists asserts that ` Path ` identifies existent config files
func TestPathConfigExists(t *testing.T) {
	confFile, err := ioutil.TempFile("", "cheat-test")
	if err != nil {
		t.Errorf("failed to create temp file: %v", err)
	}
	defer os.Remove(confFile.Name())
	paths := []string{
		"/cheat-test-conf-does-not-exist",
		confFile.Name(),
	}
	got, err := Path(paths)
	if err != nil {
		t.Errorf("failed to identify config file: %v", err)
	}
	if got != confFile.Name() {
		t.Errorf(
			"failed to return config path: want: %s, got: %s",
			confFile.Name(),
			got,
		)
	}
}
func TestPathConfigExists ( t * testing . T ) { confFile , err := ioutil . TempFile ( " " , " " ) if err != nil { t . Errorf ( " " , err ) } defer os . Remove ( confFile . Name ( ) ) paths := [ ] string { " " , confFile . Name ( ) , } got , err := Path ( paths ) if err != nil { t . Errorf ( " " , err ) } if got != confFile . Name ( ) { t . Errorf ( " " , confFile . Name ( ) , got , ) } }
TestPathConfigExists asserts that `Path` identifies existent config files
TestPathConfigExists asserts that ` Path ` identifies existent config files
// initialize a temporary config file // clean up the temp file // package cheatpaths // assert