Add hardlink test for New-Item

This commit is contained in:
George Fleming 2016-03-04 16:01:24 -08:00 committed by Andrew Schwartzmeyer
parent 4b744189d0
commit e52da3b1e5

View file

@ -118,4 +118,15 @@ Describe "New-Item" {
# Remove the link explicitly to avoid broken symlink issue
Remove-Item $FullyQualifiedLink -Force
}
It "Should create a hard link of a file without error" {
New-Item -Name $testfile -Path $tmpDirectory -ItemType file
Test-Path $FullyQualifiedFile | Should Be $true
New-Item -ItemType HardLink -Target $FullyQualifiedFile -Name $testlink -Path $tmpDirectory
Test-Path $FullyQualifiedLink | Should Be $true
}
}