Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Autocorrected CRLF to LF#4943

Merged
daxian-dbw merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:crlf2lfSteveL-MSFT/PowerShell:crlf2lfCopy head branch name to clipboard
Sep 29, 2017
Merged

Autocorrected CRLF to LF#4943
daxian-dbw merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:crlf2lfSteveL-MSFT/PowerShell:crlf2lfCopy head branch name to clipboard

Conversation

@SteveL-MSFT

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

Copy link
Copy Markdown
Member

Fixed Parser.Tests.ps1 to use regex:

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

@daxian-dbw

Copy link
Copy Markdown
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
Copy Markdown
Member Author

@daxian-dbw that's an awesome tip!

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.