-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commonize \r\n / \n handling in test cases. #1519
Conversation
Extracted from microsoft#1514 Rather than each test case inventing their own way of dealing with the Windows/Linux `r`n vs `n difference, this change just always makes the output collection functions to do that transformation.
r
n / `n handling in test cases.r
n / ``n handling in test cases.
r
n / ``n handling in test cases.@@ -51,20 +51,25 @@ if ($output -notmatch 'Trailing comma') { | |||
# Check for msgAlreadyInstalled vs. msgAlreadyInstalledNotHead | |||
$output = Run-VcpkgAndCaptureOutput @commonArgs --overlay-ports="$PSScriptRoot/../e2e-ports" install vcpkg-internal-e2e-test-port3 | |||
Throw-IfFailed | |||
if ($output -notmatch 'vcpkg-internal-e2e-test-port3:[^ ]+ is already installed') { | |||
if (-not $output -contains @" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it is testing for completely different output; what am I missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I'm surprised it passes now. There is duplicate output here. In #1514 from which this change was extracted, I removed the duplicate output, and had to fix this test to look for the not removed of the two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this one to do Throw-IfNotContains and I reverted the other one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted from #1514
Rather than each test case inventing their own way of dealing with the Windows/Linux `r`n vs `n difference, this change just always makes the output collection functions to do that transformation.