PowerShell/test/powershell/Language
Bruce Payette 3a4c410499 Fix for #6855 - Measure-Object should handle scriptblock properties. (#6934)
Measure-Object should handle `ScriptBlock` properties. Fixed by renaming `MshExpression` to `PSPropertyExpression` and making it public. Then in `MeasureObjectCommand`, lifting it up to the parameter level. Previously the implementation exposed the Property as a string and
wrapped it internally as a `PSPropertyExpression`. Now the parameter type is `PSPropertyExpression` directly allowing for both wildcard strings and `ScriptBlock`.

`PSPropertyExpression` now lives in a public namespace where it can be used by cmdlet and script authors to easily add the same type of functionality to their commands. I also modified `PSPropertyExpression` to handle hashtables properly as objects so
         @{prop = 3} | measure-object prop
and
         @{prop = 3} | measure-object {$_.prop}
will work the same. (Previously the example using just the property name would fail.)
2018-06-20 00:23:11 -07:00
..
Classes Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
Interop/DotNet Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
Operators Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
Parser Fix for #6855 - Measure-Object should handle scriptblock properties. (#6934) 2018-06-20 00:23:11 -07:00
Scripting Remove ShouldBeErrorId custom function. (#6891) 2018-05-23 07:57:03 +05:00
CompletionTestSupport.psm1 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00