File tree Expand file tree Collapse file tree 1 file changed +21
-14
lines changed Expand file tree Collapse file tree 1 file changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -278,20 +278,27 @@ Describe "UseUsingScopeModifierInNewRunspaces" {
278278 # Issue 1492: https://github.com/PowerShell/PSScriptAnalyzer/issues/1492
279279 @ {
280280 Description = ' Does not throw when the same variable name is used in two different sessions'
281- ScriptBlock = @'
282- function Get-One{
283- Invoke-Command -Session $sourceRemoteSession {
284- $a = $sccmModule
285- foo $a
286- }
287- }
288- function Get-Two{
289- Invoke-Command -Session $sourceRemoteSession {
290- $a = $sccmModule
291- foo $a
292- }
293- }
294- '@
281+ ScriptBlock = ' {
282+ function Get-One {
283+ Invoke-Command -Session -ScriptBlock $sourceRemoteSession {
284+ $a = $sccmModule
285+ foo $a
286+ }
287+ }
288+ function Get-Two {
289+ Invoke-Command -Session -ScriptBlock $sourceRemoteSession {
290+ $a = $sccmModule
291+ foo $a
292+ }
293+ }
294+ }'
295+ }
296+ # Script block with variables in params(), issue #1504: https://github.com/PowerShell/PSScriptAnalyzer/issues/1504
297+ @ {
298+ Description = ' Does not throw when variable is defined inside params()'
299+ ScriptBlock = ' {
300+
301+ }'
295302 }
296303 )
297304 }
You can’t perform that action at this time.
0 commit comments