Update based on PR feedback
This commit is contained in:
parent
b488d7eb35
commit
11e279d688
1 changed files with 9 additions and 9 deletions
|
@ -130,9 +130,9 @@ Describe 'Testing of script internationalization' -Tags "CI" {
|
||||||
}
|
}
|
||||||
|
|
||||||
$testData = @(
|
$testData = @(
|
||||||
@{cmd = 'data d { @{ x=$(get-command)} }';Expected='*get-command*'},
|
@{cmd = 'data d { @{ x=$(get-command)} }';Expected='get-command'},
|
||||||
@{cmd = 'data d { if ($(get-command)) {} }';Expected='*get-command*'},
|
@{cmd = 'data d { if ($(get-command)) {} }';Expected='get-command'},
|
||||||
@{cmd = 'data d { @(get-command) }';Expected='*get-command*'}
|
@{cmd = 'data d { @(get-command) }';Expected='get-command'}
|
||||||
)
|
)
|
||||||
|
|
||||||
It 'Allowed cmdlets checked properly' -TestCase:$testData {
|
It 'Allowed cmdlets checked properly' -TestCase:$testData {
|
||||||
|
@ -141,10 +141,10 @@ Describe 'Testing of script internationalization' -Tags "CI" {
|
||||||
$script:exception = $null
|
$script:exception = $null
|
||||||
& {
|
& {
|
||||||
trap {$script:exception = $_.Exception ; continue }
|
trap {$script:exception = $_.Exception ; continue }
|
||||||
iex $cmd
|
invoke-expression $cmd
|
||||||
}
|
}
|
||||||
#$exception -like '*get-command*' | Should Be $true
|
|
||||||
$exception -like $Expected | Should Be $true
|
$exception | Should Match $Expected
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue