Fix false positives

This commit is contained in:
xtqqczze
2020-01-13 19:39:58 +00:00
parent 090ad9cb33
commit a454352f32
3 changed files with 10 additions and 10 deletions
+6 -6
View File
@@ -185,8 +185,8 @@ Describe "ConsoleHost unit tests" -tags "Feature" {
It "-File should be able to pass bool string values as string to parameters: <BoolString>" -TestCases @(
# validates case is preserved
@{BoolString = '$true'},
@{BoolString = '$false'},
@{BoolString = '$truE'},
@{BoolString = '$falSe'},
@{BoolString = 'trUe'},
@{BoolString = 'faLse'}
) {
@@ -198,8 +198,8 @@ Describe "ConsoleHost unit tests" -tags "Feature" {
It "-File should be able to pass bool string values as string to positional parameters: <BoolString>" -TestCases @(
# validates case is preserved
@{BoolString = '$true'},
@{BoolString = '$false'},
@{BoolString = '$tRue'},
@{BoolString = '$falSe'},
@{BoolString = 'tRUe'},
@{BoolString = 'fALse'}
) {
@@ -210,8 +210,8 @@ Describe "ConsoleHost unit tests" -tags "Feature" {
}
It "-File should be able to pass bool string values as bool to switches: <BoolString>" -TestCases @(
@{BoolString = '$true'; BoolValue = 'True'},
@{BoolString = '$false'; BoolValue = 'False'},
@{BoolString = '$tRue'; BoolValue = 'True'},
@{BoolString = '$faLse'; BoolValue = 'False'},
@{BoolString = 'tRue'; BoolValue = 'True'},
@{BoolString = 'fAlse'; BoolValue = 'False'}
) {
@@ -225,13 +225,13 @@ Describe 'Positive Parse Properties Tests' -Tags "CI" {
[void] m()
{
$LASTEXITCODE
$LASTEXITCODE
$lastexitcode
'111' -Match '1'
$Matches
$Matches
$mAtches
$error[0]
$error
$PWD
$pwd
foreach ($i in 1..10) {$foreach}
switch ($i)
{
@@ -33,7 +33,7 @@ Describe "BooleanParameterDCR Tests" -tags "CI" {
$tests = @(
@{ inputTest = $(1 -eq 1); expected = $true },
@{ inputTest = $true; expected = $true },
@{ inputTest = $true; expected = $true }
@{ inputTest = $TRUE; expected = $true }
)
It "Test that $true is accepted as a true value for Switch parameters, inputTest:<inputTest>,expect:<expected>" -TestCases $tests {
param ( $inputTest, $expected )