mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Enable bug777 skip for Get-Variable
This commit is contained in:
1 parent
95eade1305
commit
0531914377
1 file changed
+4
-2
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
Describe "Get-Variable DRT Unit Tests" -Tags DRT{
|
Describe "Get-Variable DRT Unit Tests" -Tags DRT{
|
||||||
It "Get-Variable not exist variable Name should throw ItemNotFoundException skip now as bug#777" -Skip:$true{
|
It "Get-Variable not exist variable Name should throw ItemNotFoundException"{
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
try {
|
try {
|
||||||
Get-Variable -Name nonexistingVariableName
|
Get-Variable -Name nonexistingVariableName
|
||||||
Throw "Execution OK"
|
Throw "Execution OK"
|
||||||
@@ -8,6 +9,7 @@ Describe "Get-Variable DRT Unit Tests" -Tags DRT{
|
|||||||
catch {
|
catch {
|
||||||
$_.FullyQualifiedErrorId | Should be "VariableNotFound,Microsoft.PowerShell.Commands.GetVariableCommand"
|
$_.FullyQualifiedErrorId | Should be "VariableNotFound,Microsoft.PowerShell.Commands.GetVariableCommand"
|
||||||
}
|
}
|
||||||
|
$ErrorActionPreference = "SilentlyContinue"
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Get-Variable exist variable Name with include and bogus exclude should work"{
|
It "Get-Variable exist variable Name with include and bogus exclude should work"{
|
||||||
@@ -39,7 +41,7 @@ Describe "Get-Variable DRT Unit Tests" -Tags DRT{
|
|||||||
$var1[2].Value|Should Be "another test"
|
$var1[2].Value|Should Be "another test"
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Get-Variable an exist private variable Name should throw ItemNotFoundException skip now as bug#777" -Skip:$true{
|
It "Get-Variable an exist private variable Name should throw ItemNotFoundException skip now as bug#818" -Skip:$true{
|
||||||
try {
|
try {
|
||||||
Set-Variable newVar testing -Option Private
|
Set-Variable newVar testing -Option Private
|
||||||
Get-Variable -Name newVar
|
Get-Variable -Name newVar
|
||||||
|
|||||||
Reference in new issue
Block a user