Title: $input type in advanced functions · Issue #1563 · PowerShell/PowerShell · GitHub
Open Graph Title: $input type in advanced functions · Issue #1563 · PowerShell/PowerShell
X Title: $input type in advanced functions · Issue #1563 · PowerShell/PowerShell
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...
Open Graph 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-Outp...
X 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 { Wr...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/1563
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"$input type in advanced functions","articleBody":"We have a test for `$input` type behavior in advanced functions (functions that are cmdlets).\n\n``` powershell\nIt '$input Type should be enumerator' {\n function from_begin { [cmdletbinding()]param() begin { Write-Output -NoEnumerate $input } }\n function from_process { [cmdletbinding()]param() process { Write-Output -NoEnumerate $input } }\n function from_end { [cmdletbinding()]param() end { Write-Output -NoEnumerate $input } }\n\n (from_begin) -is [System.Collections.IEnumerator] | Should Be $true\n (from_process) -is [System.Collections.IEnumerator] | Should Be $true\n (from_end) -is [System.Collections.IEnumerator] | Should Be $true\n } \n```\n\nhttps://github.com/PowerShell/PowerShell/blob/b731549a198c538d0e5e3ca4c50183f988b5f7e2/test/powershell/Language/Parser/AutomaticVariables.Tests.ps1#L3\n\nThis tests works fine in PS v2. Since then, the behavior changed to this\n\n``` powershell\n (from_begin) -is [System.Collections.ArrayList] | Should Be $true\n (from_process) -is [System.Collections.ArrayList] | Should Be $true\n (from_end) -is [System.Object[]] | Should Be $true\n```\n\nWhich is pretty inconsistent, but exists since v3.\n\n@lzybkr was trying to fix it (back to v2 behavior) and it broke a couple customer scenarios.\n\nPlan: we will gover feedback about this issue and may consider go thru breaking change process.\nMeanwhile, I'm marking the test as `-Skip`\n","author":{"url":"https://github.com/vors","@type":"Person","name":"vors"},"datePublished":"2016-07-29T00:48:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1563/PowerShell/issues/1563"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:246270b0-3b3a-4e30-757b-c04adec73d18 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E90A:3696F0:A5DA2:E08F2:6A546481 |
| html-safe-nonce | caa1c169dfb46b8ec887a66d89992f1a366fe0dac2c848ee14c8afbf3ad47489 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTBBOjM2OTZGMDpBNURBMjpFMDhGMjo2QTU0NjQ4MSIsInZpc2l0b3JfaWQiOiI2MjU1NzUzNzY0MDEzMzY4NDQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 97af219e871c612a38a5f614d9c6a8a3d42b62ac48170fc1a802bbaa21b85edc |
| hovercard-subject-tag | issue:168228403 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/1563/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c41033a30c968757c93b87be2f24ce1097abc2c81c44b2082ec44b880af2e0f1/PowerShell/PowerShell/issues/1563 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c41033a30c968757c93b87be2f24ce1097abc2c81c44b2082ec44b880af2e0f1/PowerShell/PowerShell/issues/1563 |
| og:image:alt | 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-Outp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vors |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d28624802c2f7d9500239dd6870ed7031b7353b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width