mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix false positives
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user