PowerShell/test/powershell/Language/Parser
Dongbo Wang 4c29f5768d Fix bugs with expression redirected to file (#4847)
When handling file redirection for CommandExpression, we don't call 'DoComplete' on the underlying PipelineProcessor of the FileRedirection object, and thus the EndProcessing method is not called on Out-File, which causes different behaviors between <expr> > out.txt and <expr> | Out-File out.txt.

The fix is to make sure 'DoComplete' is called after the stream output has been written to the redirection pipe.

Also fix another issue

This PR also fixes an issue that could mess up restoring the original pipes. Here is the repro:

PS> 1 *> b.txt > a.txt; 123
Cannot perform operation because object "PipelineProcessor" has already been disposed
The root cause is that we don't always restore pipes in the correct order. Please see the code changes in Compiler.cs for more details.

Fix #4812
2017-09-20 14:39:02 -07:00
..
Ast.Tests.ps1 Fix GetType() bad pattern and related issues in tests (#3134) 2017-02-15 16:40:51 -08:00
AutomaticVariables.Tests.ps1 Skip $input type test per #1563 2016-07-28 18:02:24 -07:00
BNotOperator.Tests.ps1 Fix GetType() bad pattern and related issues in tests (#3134) 2017-02-15 16:40:51 -08:00
Conversions.Tests.ps1 Search the assembly cache kept by ExecutionContext for type resolution. (#3327) 2017-03-17 13:19:31 -07:00
ExtensibleCompletion.Tests.ps1 Fix tab completion of native parameters (#2919) 2017-02-13 16:02:56 -08:00
LanguageAndParser.TestFollowup.Tests.ps1 PSScriptAnalyzer fixes by category (#4261) 2017-07-21 21:03:49 -07:00
MethodInvocation.Tests.ps1 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
ParameterBinding.Tests.ps1 Fix spurious error generated when importing cmdlets from an in-memory assembly (#4117) 2017-06-30 15:36:38 -07:00
Parser.Tests.ps1 Rename $IsOSX to $IsMacOS (#4757) 2017-09-07 10:34:40 -07:00
Parsing.Tests.ps1 Implement Unicode escape parsing (#3958) 2017-06-27 22:55:57 -07:00
RedirectionOperator.Tests.ps1 Fix bugs with expression redirected to file (#4847) 2017-09-20 14:39:02 -07:00
TypeAccelerator.Tests.ps1 Added tests for built-in type accelerators (#4230) 2017-07-14 09:53:28 -07:00
UsingAssembly.Tests.ps1 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
UsingNamespace.Tests.ps1 Add autoload for TestLanguage.psm1 TestHelpers.psm1 (#3456) 2017-05-17 11:09:27 -07:00