From 90defe681dcfd6fd63b80571a859cc2fa93ed644 Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Tue, 12 Jul 2016 15:58:21 -0700 Subject: [PATCH] Changing childitem to cope with regex --- .../Microsoft.PowerShell.Management/New-Item.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1 index 2b51c50f40..593f892ad9 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1 @@ -112,7 +112,7 @@ Describe "New-Item" { Test-Path $FullyQualifiedLink | Should Be $true $fileInfo = Get-ChildItem $FullyQualifiedLink - $fileInfo.Target | Should Match $FullyQualifiedFile + $fileInfo.Target | Should Match ([regex]::Escape($FullyQualifiedFile)) $fileInfo.LinkType | Should Be "SymbolicLink" } @@ -135,7 +135,7 @@ Describe "New-Item" { Test-Path $FullyQualifiedLink | Should Be $true $fileInfo = Get-ChildItem $FullyQualifiedLink - $fileInfo.Target | Should Match $FullyQualifiedFolder + $fileInfo.Target | Should Match ([regex]::Escape($FullyQualifiedFolder)) $fileInfo.LinkType | Should Be "SymbolicLink" # Remove the link explicitly to avoid broken symlink issue