testing: Simplify line ending handling in tests#14682
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
There was a problem hiding this comment.
Pull request overview
This PR removes ad-hoc CRLF→LF normalization from Hugo’s testscript-based tests by enforcing LF line endings for the testscripts/ tree via Git attributes, simplifying the test scripts and centralizing line-ending behavior.
Changes:
- Removed
dostounixpreprocessing steps from multipletestscripts/commands/*.txtscripts. - Added
testscripts/.gitattributesto enforceeol=lffor text files undertestscripts/. - Removed the custom
dostounixtestscript command frommain_test.go(now unused).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| testscripts/commands/mod_vendor__versions.txt | Drops dostounix step; relies on LF-normalized fixtures. |
| testscripts/commands/mod_vendor.txt | Drops dostounix step; relies on LF-normalized fixtures. |
| testscripts/commands/mod_tidy.txt | Drops dostounix step for golden file comparison. |
| testscripts/commands/mod_npm_withexisting.txt | Drops dostounix steps for package.json goldens. |
| testscripts/commands/mod_npm__moduleorder.txt | Drops dostounix steps for npm pack goldens. |
| testscripts/commands/mod_npm.txt | Drops multiple dostounix steps for npm pack goldens. |
| testscripts/commands/mod_init.txt | Drops dostounix step for go.mod golden comparison. |
| testscripts/commands/mod.txt | Drops dostounix steps for vendor/go.mod goldens. |
| testscripts/.gitattributes | Enforces LF line endings for text files in testscripts/. |
| main_test.go | Removes the dostounix testscript helper command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.