func TestAddParentPermsWindows(t *testing.T) {
	assert := assert.New(t)

	permsInfos := make(permissionsInfos)
	expectedParentPerms := map[string]filePermsInfo{}

	// Basic Case
	path := "C:\\a\\b\\c\\d"
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)

	// Empty Case
	path = ""
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)

	// Only root
	permsInfos = make(permissionsInfos)
	path = "C:\\"
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)

	// Space in path
	permsInfos = make(permissionsInfos)
	path = "D:\\a b\\c"
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)

	// Dot in path
	permsInfos = make(permissionsInfos)
	path = "E:\\a.b\\c"
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)

}
// Test that addParentPerms does not loop on Windows.
Test that addParentPerms does not loop on Windows.
// Test that addParentPerms does not loop on Windows .
func TestAddParentPermsWindows(t *testing.T) {
	assert := assert.New(t)
	permsInfos := make(permissionsInfos)
	expectedParentPerms := map[string]filePermsInfo{}
	path := "C:\\a\\b\\c\\d"
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)
	path = ""
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)
	permsInfos = make(permissionsInfos)
	path = "C:\\"
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)
	permsInfos = make(permissionsInfos)
	path = "D:\\a b\\c"
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)
	permsInfos = make(permissionsInfos)
	path = "E:\\a.b\\c"
	addParentPerms(path, permsInfos)
	assert.EqualValues(expectedParentPerms, permsInfos)
}
func TestAddParentPermsWindows ( t * testing . T ) { assert := assert . New ( t ) permsInfos := make ( permissionsInfos ) expectedParentPerms := map [ string ] filePermsInfo { } path := " \\ \\ \\ \\ " addParentPerms ( path , permsInfos ) assert . EqualValues ( expectedParentPerms , permsInfos ) path = " " addParentPerms ( path , permsInfos ) assert . EqualValues ( expectedParentPerms , permsInfos ) permsInfos = make ( permissionsInfos ) path = " \\ " addParentPerms ( path , permsInfos ) assert . EqualValues ( expectedParentPerms , permsInfos ) permsInfos = make ( permissionsInfos ) path = " \\ \\ " addParentPerms ( path , permsInfos ) assert . EqualValues ( expectedParentPerms , permsInfos ) permsInfos = make ( permissionsInfos ) path = " \\ \\ " addParentPerms ( path , permsInfos ) assert . EqualValues ( expectedParentPerms , permsInfos ) }
Test that addParentPerms does not loop on Windows.
Test that addParentPerms does not loop on Windows .
// Basic Case // Empty Case // Only root // Space in path // Dot in path