Skip to content

units: Restore original EOLs #4268

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

b4n
Copy link
Member

@b4n b4n commented Jun 2, 2025

Do not manage EOL for any test input that have non-LF EOLs, in order to keep the tests as they were originally meant to be.

Since 1efb9b9 all EOLs are converted by default, which is a problem for test files requiring a specific EOL type to work. Those should not see any conversion whatsoever, basically treated as binary data.

The changes here are mostly generated with:

$ find Units/ -name 'input*' -exec file '{}' ';' | \
  grep CR | \
  sed 's/: .*$//' | \
  while read -r f; do \
    d="${f%/*}"; \
    b="${f##*/}"; \
    echo "$b -text" > "$d/.gitattributes"; \
    git add "$d/.gitattributes"; \
  done

@masatake I see there was an attempt at this before #3425, what was the exact issues it created?
Couldn't we to something like this? (remove the text attribute rather trying to remove the auto value)

/Units/**/input* -text

Do not manage EOL for any test input that have non-LF EOLs, in order to
keep the tests as they were originally meant to be.

Since 1efb9b9 all EOLs are converted
by default, which is a problem for test files requiring a specific EOL
type to work.  Those should not see any conversion whatsoever,
basically treated as binary data.

The changes here are mostly generated with:

```
$ find Units/ -name 'input*' -exec file '{}' ';' | \
  grep CR | \
  sed 's/: .*$//' | \
  while read -r f; do \
    d="${f%/*}"; \
    b="${f##*/}"; \
    echo "$b -text" > "$d/.gitattributes"; \
    git add "$d/.gitattributes"; \
  done
```
Copy link

codecov bot commented Jun 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.95%. Comparing base (74ff528) to head (3148a3b).
Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4268   +/-   ##
=======================================
  Coverage   85.95%   85.95%           
=======================================
  Files         246      246           
  Lines       63470    63434   -36     
=======================================
- Hits        54554    54525   -29     
+ Misses       8916     8909    -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masatake masatake added this to the 6.2.1 milestone Jun 8, 2025
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.

2 participants