Skip to content
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

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

BillyONeal
Copy link
Member

@BillyONeal BillyONeal commented Oct 21, 2024

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.

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.
@BillyONeal BillyONeal changed the title Commonize rn / `n handling in test cases. Commonize rn / ``n handling in test cases. Oct 21, 2024
@BillyONeal BillyONeal changed the title Commonize rn / ``n handling in test cases. Commonize \r\n / \n handling in test cases. Oct 21, 2024
@@ -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 @"
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@BillyONeal BillyONeal merged commit ffc69f0 into microsoft:main Oct 22, 2024
6 checks passed
@BillyONeal BillyONeal deleted the test-newlines branch October 22, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants