Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Sep 29, 2017

Fixed Parser.Tests.ps1 to use regex:

$result | should match "\r?\nfoo``u\{2195\}abc\r?\n"

@daxian-dbw
Copy link
Member

Add ?w=1 to the URL to see the diff with whitespace ignored --
https://github.com/PowerShell/PowerShell/pull/4943/files?w=1. It looks good to me.

@SteveL-MSFT
Copy link
Member Author

@daxian-dbw that's an awesome tip!

Copy link
Member

Choose a reason for hiding this comment

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

Actually, one question about \r?\n here. Is it because we use CRLF on windows and LF on Unix? If so, can we do the following instead?

$newLine = [System.Environment]::NewLine
$result | should be "${newLine}foo``u\{2195\}abc${newLine}"

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is because git converts files to CRLF on Windows. I like your suggestion and will make the change.

@SteveL-MSFT
Copy link
Member Author

@daxian-dbw I'm going to revert that last change, seems that on Windows you might have git set to not convert to CRLF which may be why it's failing on AppVeyor as it was just LF.

address PR feedback
This reverts commit 5a35a4a342581545cc3d22ec608c03d50ccebc85.
@daxian-dbw daxian-dbw merged commit 2639cd8 into PowerShell:master Sep 29, 2017
@SteveL-MSFT SteveL-MSFT deleted the crlf2lf branch October 26, 2018 21:34
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.

3 participants