-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Breaking-Changebreaking change that may affect usersbreaking change that may affect usersCommittee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionResolution-By DesignThe reported behavior is by design.The reported behavior is by design.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
We have a test for $input type behavior in advanced functions (functions that are cmdlets).
It '$input Type should be enumerator' {
function from_begin { [cmdletbinding()]param() begin { Write-Output -NoEnumerate $input } }
function from_process { [cmdletbinding()]param() process { Write-Output -NoEnumerate $input } }
function from_end { [cmdletbinding()]param() end { Write-Output -NoEnumerate $input } }
(from_begin) -is [System.Collections.IEnumerator] | Should Be $true
(from_process) -is [System.Collections.IEnumerator] | Should Be $true
(from_end) -is [System.Collections.IEnumerator] | Should Be $true
} | It '$input Type should be enumerator' { |
This tests works fine in PS v2. Since then, the behavior changed to this
(from_begin) -is [System.Collections.ArrayList] | Should Be $true
(from_process) -is [System.Collections.ArrayList] | Should Be $true
(from_end) -is [System.Object[]] | Should Be $trueWhich is pretty inconsistent, but exists since v3.
@lzybkr was trying to fix it (back to v2 behavior) and it broke a couple customer scenarios.
Plan: we will gover feedback about this issue and may consider go thru breaking change process.
Meanwhile, I'm marking the test as -Skip
Metadata
Metadata
Assignees
Labels
Breaking-Changebreaking change that may affect usersbreaking change that may affect usersCommittee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionResolution-By DesignThe reported behavior is by design.The reported behavior is by design.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime