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

Tests: Automatically normalize line ends #2934

Merged
merged 10 commits into from Jun 13, 2021

Conversation

RunDevelopment
Copy link
Member

Also discussed here, The parser for .test files will now automatically convert all file contents to CRLF line ends. This ensures that all languages are tested with the more difficult line ends.

This lead to the discovery (and fix) of a bug in False.

This PR contains 4 things:

  • The parser now converting line ends.
  • .test files no longer being declared as binary in .gitattributes.
  • The fix for False.
  • The changes for all changed test files. Some test files used LF line ends which were reflected in the JSON.

This PR does not convert the line ends of existing .test files to LF. This means that we now have a bunch of CRLF files in the repo. Should I convert them?

@mAAdhaTTah @joshgoebel

@github-actions
Copy link

github-actions bot commented Jun 5, 2021

JS File Size Changes (gzipped)

A total of 1 files have changed, with a combined diff of +6 B (+2.3%).

file master pull size diff % diff
components/prism-false.min.js 260 B 266 B +6 B +2.3%

Generated by 🚫 dangerJS against 6f540bf

@joshgoebel
Copy link

This means that we now have a bunch of CRLF files in the repo. Should I convert them?

I'm personally in favor of unix line endings - whichever one that is - and being consistent seems appropriate.

@RunDevelopment
Copy link
Member Author

Advice for reviewers: Don't open the "Files" tab on Github, your tab will freeze.

@RunDevelopment
Copy link
Member Author

Ok, no. I reverted that. I did a small test and these EOL changes will conflict will literally every PR that changes a test file.

@RunDevelopment RunDevelopment merged commit 99f3ddc into PrismJS:master Jun 13, 2021
@RunDevelopment RunDevelopment deleted the test-line-ends branch June 13, 2021 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants