Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Pester test for Windows
  • Loading branch information
Jeff Bienstadt committed Apr 19, 2017
commit a1e905b9c12138ba775106c9bf9190191a42f706
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ Describe "Copy-Item can avoid copying an item onto itself" -Tags "CI", "RequireA
}
else
{
Copy-Item -Path $sourcePath -Destination $destinationPath -ErrorAction SilentlyContinue | ShouldBeErrorId "CopyError,Microsoft.PowerShell.Commands.CopyItemCommand"
$_.Exception | Should BeOfType System.IO.IOException
$_.Exception.Data[$selfCopyKey] | Should Not Be $null
{ Copy-Item -Path $sourcePath -Destination $destinationPath -ErrorAction Stop } | ShouldBeErrorId "CopyError,Microsoft.PowerShell.Commands.CopyItemCommand"
$Error[0].Exception | Should BeOfType System.IO.IOException
$Error[0].Exception.Data[$selfCopyKey] | Should Not Be $null
}
}
}
Expand Down Expand Up @@ -806,7 +806,7 @@ Describe "Extended FileSystem Path/Location Cmdlet Provider Tests" -Tags "Featur
$result = Split-Path -Path $level1_0Full -Leaf
$result | Should Be $level1_0
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It distracts attention. We should make separate PR for formatting.

It 'Validate LeafBase' {
$result = Split-Path -Path "$level2_1Full$fileExt" -LeafBase
$result | Should Be $level2_1
Expand Down