Skip to content

testing: Simplify line ending handling in tests#14682

Merged
bep merged 1 commit intogohugoio:masterfrom
bep:lineendingsintests
Mar 28, 2026
Merged

testing: Simplify line ending handling in tests#14682
bep merged 1 commit intogohugoio:masterfrom
bep:lineendingsintests

Conversation

@bep
Copy link
Copy Markdown
Member

@bep bep commented Mar 28, 2026

No description provided.

@gemini-code-assist
Copy link
Copy Markdown

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 dostounix preprocessing steps from multiple testscripts/commands/*.txt scripts.
  • Added testscripts/.gitattributes to enforce eol=lf for text files under testscripts/.
  • Removed the custom dostounix testscript command from main_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.

@bep bep merged commit b55d452 into gohugoio:master Mar 28, 2026
10 checks passed
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.

2 participants