mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Merge pull request #615 from PowerShell/merge-sd
Bump monad and windows-build with Source Depot changes
This commit is contained in:
+1
-1
Submodule src/monad updated: e0dc79b074...1d26807583
+1
-1
Submodule src/windows-build updated: 994a3f231b...64f2c7d5b3
@@ -17,6 +17,7 @@
|
||||
}
|
||||
|
||||
Describe "New-Item" {
|
||||
$isWindows = [System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform([System.Runtime.InteropServices.OSPlatform]::Windows)
|
||||
$tmpDirectory = $TestDrive
|
||||
$testfile = "testfile.txt"
|
||||
$testfolder = "newDirectory"
|
||||
@@ -101,6 +102,12 @@ Describe "New-Item" {
|
||||
}
|
||||
|
||||
It "Should create a symbolic link of a file without error" {
|
||||
# Making symbolic links on Windows requires administrator access
|
||||
if ($isWindows)
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
New-Item -Name $testfile -Path $tmpDirectory -ItemType file
|
||||
Test-Path $FullyQualifiedFile | Should Be $true
|
||||
|
||||
@@ -109,6 +116,12 @@ Describe "New-Item" {
|
||||
}
|
||||
|
||||
It "Should create a symbolic link from directory without error" {
|
||||
# Making symbolic links on Windows requires administrator access
|
||||
if ($isWindows)
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
New-Item -Name $testFolder -Path $tmpDirectory -ItemType directory
|
||||
Test-Path $FullyQualifiedFolder | Should Be $true
|
||||
|
||||
@@ -118,6 +131,4 @@ Describe "New-Item" {
|
||||
# Remove the link explicitly to avoid broken symlink issue
|
||||
Remove-Item $FullyQualifiedLink -Force
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user