PowerShell/test
Dan Thompson ce3cb68551 Make Select-Object/ForEach-Object/Where-Object see dynamic properties (#6898)
Dynamic (DLR) objects work in some places today, but not others.  This change expands that support to ForEach-Object, Where-Object and the family of cmdlets that use 'MshExpression' (Select-Object, etc.).

This change addresses both wildcard and non-wildcard cases. In wildcard cases, it uses the existing support of generating PSDynamicMember objects for names returned by GetDynamicMemberNames.

In non-wildcard cases, a dynamic property access is attempted whether or not the name shows up in GetDynamicMemberNames, but a truly "blind" access is only attempted if we see that the base object is an IDMOP. If the dynamic access fails, you'll get the same or a similar error experience as before ("The property 'Blarg' cannot be found", or no error at all, depending on the cmdlet and the strict mode setting).

The included test coverage includes a stub for the.ForEach operator--once people are happy with this change, I can continue by adding support there.

This change should allegedly also have positive perf impact, though in actual perf testing, although it does seem ever-so-slightly faster, I found it difficult to measure much difference at all.
2018-06-12 23:48:34 -07:00
..
common/markdown Fix broken links due to PR 6899 that removed GitHub docs on installation docs, known issues and breaking changes due to complete migration to docs.microsoft.com (#6981) 2018-06-05 19:37:14 -07:00
csharp CodeFactor code style cleanup: replace literal empty strings with 'string.Empty' (#6950) 2018-06-12 12:30:10 -07:00
docker/networktest Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
hosting Add tests for PowerShell hosting API to verify MyGet packages (#6737) 2018-04-27 13:25:33 -07:00
packaging/windows Simplify the paths the MSI uses (#6442) 2018-04-02 10:47:29 -07:00
powershell Make Select-Object/ForEach-Object/Where-Object see dynamic properties (#6898) 2018-06-12 23:48:34 -07:00
shebang
tools Make Select-Object/ForEach-Object/Where-Object see dynamic properties (#6898) 2018-06-12 23:48:34 -07:00
README.md
Test.Common.props Update PowerShell to build with .NET Core SDK 2.1.300-rc1-008662 (#6718) 2018-05-02 16:58:39 -07:00

Testing

The tests are organized by testing language. Thus Pester tests, which are written in the PowerShell language, are in ./powershell and xUnit tests, written in C#, are in ./csharp. The sanity tests for the Full .NET build of PowerShell are in ./fullclr, and the third-party shebang test is in ./shebang.