Update and enable the test for the type of $input (#18968)

This commit is contained in:
MartinGC94
2023-03-13 16:17:28 -07:00
committed by GitHub
parent 972641c9b4
commit 799eed8f57
@@ -2,16 +2,15 @@
# Licensed under the MIT License.
Describe 'Automatic variable $input' -Tags "CI" {
# Skip on hold for discussion on https://github.com/PowerShell/PowerShell/issues/1563
# $input type in advanced functions
It '$input Type should be enumerator' -Skip {
It '$input Type should be arraylist and object array' {
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 -BeTrue
(from_process) -is [System.Collections.IEnumerator] | Should -BeTrue
(from_end) -is [System.Collections.IEnumerator] | Should -BeTrue
(from_begin) -is [System.Collections.ArrayList] | Should -BeTrue
(from_process) -is [System.Collections.ArrayList] | Should -BeTrue
(from_end) -is [System.Object[]] | Should -BeTrue
}
It 'Empty $input really is empty' {