mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
migrated tests run clean on all platforms (locally)
This commit is contained in:
1 parent
0261372bae
commit
ce4303b873
20 files changed
+369
-321
No files matched your search
@@ -1,4 +1,4 @@
|
||||
Describe "XML cmdlets" -Tags 'P1', 'RI' {
|
||||
Describe "XML cmdlets" -Tags "Feature" {
|
||||
Context "Select-XML" {
|
||||
BeforeAll {
|
||||
$fileName = New-Item -Path 'TestDrive:\testSelectXml.xml'
|
||||
@@ -28,11 +28,15 @@ Describe "XML cmdlets" -Tags 'P1', 'RI' {
|
||||
$testcases += [TestData]::new('literalpath with relative paths', @{LiteralPath = $fileName.Name; XPath = 'Root'})
|
||||
$testcases += [TestData]::new('literalpath with absolute paths', @{LiteralPath = $fileName.FullName; XPath = 'Root'})
|
||||
$testcases += [TestData]::new('literalpath with path with dots', @{LiteralPath = $fileNameWithDots; XPath = 'Root'})
|
||||
$testcases += [TestData]::new('literalpath with network path', @{LiteralPath = $fileNameAsNetworkPath; XPath = 'Root'})
|
||||
if ( ! $IsCore ) {
|
||||
$testcases += [TestData]::new('literalpath with network path', @{LiteralPath = $fileNameAsNetworkPath; XPath = 'Root'})
|
||||
}
|
||||
$testcases += [TestData]::new('path with relative paths', @{Path = $fileName.Name; XPath = 'Root'})
|
||||
$testcases += [TestData]::new('path with absolute paths', @{Path = $fileName.FullName; XPath = 'Root'})
|
||||
$testcases += [TestData]::new('path with path with dots', @{Path = $fileNameWithDots; XPath = 'Root'})
|
||||
$testcases += [TestData]::new('path with network path', @{Path = $fileNameAsNetworkPath; XPath = 'Root'})
|
||||
if ( ! $IsCore ) {
|
||||
$testcases += [TestData]::new('path with network path', @{Path = $fileNameAsNetworkPath; XPath = 'Root'})
|
||||
}
|
||||
}
|
||||
|
||||
AfterAll {
|
||||
@@ -50,13 +54,15 @@ Describe "XML cmdlets" -Tags 'P1', 'RI' {
|
||||
}
|
||||
|
||||
It "literalpath with non filesystem path" {
|
||||
Select-XML -literalPath cert:\currentuser\my "Root" -ErrorVariable selectXmlError -ErrorAction SilentlyContinue
|
||||
$__data = "abcdefg"
|
||||
Select-XML -literalPath variable:__data "Root" -ErrorVariable selectXmlError -ErrorAction SilentlyContinue
|
||||
$selectXmlError.FullyQualifiedErrorId | Should Be 'ProcessingFile,Microsoft.PowerShell.Commands.SelectXmlCommand'
|
||||
}
|
||||
|
||||
It "path with non filesystem path" {
|
||||
Select-XML -Path cert:\currentuser\my "Root" -ErrorVariable selectXmlError -ErrorAction SilentlyContinue
|
||||
$__data = "abcdefg"
|
||||
Select-XML -Path variable:\__data "Root" -ErrorVariable selectXmlError -ErrorAction SilentlyContinue
|
||||
$selectXmlError.FullyQualifiedErrorId | Should Be 'ProcessingFile,Microsoft.PowerShell.Commands.SelectXmlCommand'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user