Add more tests to validate the current command error handling behaviors#15919
Add more tests to validate the current command error handling behaviors#15919daxian-dbw merged 4 commits intoPowerShell:masterfrom
Conversation
@iSazonov, I already did my best grouping test cases with |
| 1/0 ## throw exception. | ||
| Write-Verbose -Verbose "verbose-message" | ||
| } | ||
|
|
There was a problem hiding this comment.
Another good one here is parameter binding, where I hit some strangeness in #15833
There was a problem hiding this comment.
It would be great if you can add tests here (or to another file as you see fit) to cover the scenario after you get it fixed in #15833.
|
🎉 Handy links: |
|
🎉 Handy links: |
PR Summary
This PR adds 39 tests to validate and track the existing command error handling behaviors.
This PR is a preparation for #15177. The new tests added here will protect regressions that could be introduced to the command error handling by #15177.
Please be noted that those tests are by no means covering every aspect of the error handling behaviors.
I tried to cover most of the subtle behaviors -- some are not well known and may even be a little confusing to some extent. This is because these subtle behaviors may not be well tested, and adding those new tests will help guard me from introducing regression without knowing when working on #15177.
For the more obvious/common behaviors, I hope they are already covered by existing tests.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.