PowerShell/test/powershell/Language/Classes
Dongbo Wang 795de73d31 Fix 'using module' when module has non-terminating errors handled with 'SilentlyContinue' (#4711)
`Compiler.LoadModule` assumes that when `ps.HadErrors == true` the error stream is not empty. However, when `SilentlyContinue` is specified as the error action, the non-terminating error is not kept in `ErrorOutputPipe` of the cmdlet and thus does not appear in `ps.Streams.Error`. So when `ps.HadErrors == true` while `ps.Streams.Error` is empty, it suggests it's OK to ignore the errors because they are explicitly suppressed with `SilentlyContinue` error action.

So in my opinion, the expected behavior of `"using module .\mod.psm1"` in this case should be successful as if `ps.HaddErrors` is false.
2017-09-01 08:54:08 -07:00
..
MSFT_778492.psm1 Add new test files to Language directory 2016-07-20 12:10:12 -07:00
ProtectedAccess.Tests.ps1 Language tests now run clean on Linux 2016-07-20 12:10:12 -07:00
Scripting.Classes.Attributes.Tests.ps1 Fix C# tests for ValidateSetValuesGenerator (#4253) 2017-07-14 13:02:58 -07:00
Scripting.Classes.BasicParsing.Tests.ps1 Fix the hang issue in Travis CI build triggered by the [Feature] tag (#4536) 2017-08-09 14:01:52 -07:00
Scripting.Classes.Break.Tests.ps1 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Scripting.Classes.Exceptions.Tests.ps1 Fix GetType() bad pattern and related issues in tests (#3134) 2017-02-15 16:40:51 -08:00
scripting.Classes.inheritance.tests.ps1 Fix the hang issue in Travis CI build triggered by the [Feature] tag (#4536) 2017-08-09 14:01:52 -07:00
Scripting.Classes.MiscOps.Tests.ps1 PSScriptAnalyzer fixes by category (#4261) 2017-07-21 21:03:49 -07:00
Scripting.Classes.Modules.Tests.ps1 PSScriptAnalyzer fixes by category (#4261) 2017-07-21 21:03:49 -07:00
scripting.Classes.NestedModules.tests.ps1 PSScriptAnalyzer fixes by category (#4261) 2017-07-21 21:03:49 -07:00
Scripting.Classes.RunPath.Tests.ps1 Added comma to the list of replaced characters in assemblyname (#4136) 2017-07-06 11:32:54 -07:00
Scripting.Classes.StaticMethod.Tests.ps1 Run PowerShell class static methods in the correct Runspace/SessionState (#4209) 2017-07-14 18:05:48 -07:00
scripting.Classes.using.tests.ps1 Fix 'using module' when module has non-terminating errors handled with 'SilentlyContinue' (#4711) 2017-09-01 08:54:08 -07:00
scripting.enums.tests.ps1 Fix non-fatal (red) errors in test output (#3968) 2017-06-09 16:29:59 -07:00