Skip to content

Commit 7912b03

Browse files
authored
Update UseDeclaredVarsMoreThanAssignments.tests.ps1
1 parent c722746 commit 7912b03

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/Rules/UseDeclaredVarsMoreThanAssignments.tests.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ function MyFunc2() {
5858
Should -Be 0
5959
}
6060

61+
It "does not flag `$PSNativeCommandArgumentPassing variable" {
62+
Invoke-ScriptAnalyzer -ScriptDefinition '$PSNativeCommandArgumentPassing=None' -IncludeRule $violationName | `
63+
Get-Count | `
64+
Should -Be 0
65+
}
66+
6167
It "does not flag global variable" {
6268
Invoke-ScriptAnalyzer -ScriptDefinition '$global:x=$null' -IncludeRule $violationName | `
6369
Get-Count | `

0 commit comments

Comments
 (0)