PowerShell/test/powershell/Language/Parser
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
..
Ast.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
AutomaticVariables.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
BNotOperator.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
Conversions.Tests.ps1 Further improve PSMethod to Delegate conversion (#6851) 2018-05-15 11:45:04 -07:00
ExtensibleCompletion.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
LanguageAndParser.TestFollowup.Tests.ps1 Fix parser to continue parsing key-value pairs after an If-Statement value in a HashExpression (#7002) 2018-06-06 09:38:05 -07:00
MethodInvocation.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
ParameterBinding.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
Parser.Tests.ps1 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
Parsing.Tests.ps1 Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
RedirectionOperator.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
TypeAccelerator.Tests.ps1 Fix for #6855 - Measure-Object should handle scriptblock properties. (#6934) 2018-06-20 00:23:11 -07:00
UsingAssembly.Tests.ps1 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
UsingNamespace.Tests.ps1 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00