Skip to content

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
$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
Collaborator

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