Fixes Convert-FailureLines for Core vs. Desktop PS#1475
Merged
nohwnd merged 3 commits intoApr 4, 2020
Conversation
For the desktop version of Powershell, when getting the exception message, there would be 3 lines: the exeception name and message, any parameter name, and then the inner exception type (and first line message): <Exception Name>: <first message line> Parameter: <param name> <Inner Exception Name>: <first inner exn line> But, in PowerShell Core (7.0?), the output looked like this: <Exception name>: <first message line> (Parameter '<param name>') <Inner Exception name>: <first inner exn line> This commit detects whether the first message line matches a regex that matches the parenthesized parameter name in the first message line, and if so, splits the line into two. This "normalizes" the message lines between PowerShell Desktop and PowerShell Core.
Contributor
Author
This was referenced Apr 3, 2020
The text changed in powershell 7
This reverts commit 8d0974a.
Member
|
Done, sorry for the holdup, I mostly ignore Pester notifications during week, because I work on github and they would distract me :) |
Contributor
Author
|
Oh! Sure. I’ll keep that in mind for the future. And, thanks!!
…Sent from my Windows 10 phone
From: Jakub Jareš
Sent: Saturday, April 4, 2020 1:58
To: pester/Pester
Cc: Craig E. Shea; Author
Subject: Re: [pester/Pester] Fixes Convert-FailureLines for Core vs. DesktopPS (#1475)
Done, sorry for the holdup, I mostly ignore Pester notifications during week, because I work on github and they would distract me :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For the desktop version of Powershell, when getting the exception
message, there would be 3 lines: the exeception name and message, any
parameter name, and then the inner exception type (and first line
message):
But, in PowerShell Core (7.0?), the output looked like this:
This commit detects whether the first message line matches a regex that
matches the parenthesized parameter name in the first message line, and
if so, splits the line into two. This "normalizes" the message lines
between PowerShell Desktop and PowerShell Core.