From 0234845f1fcc1936bfebf731c8a0ef1075f3a350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Zander?= <96420681+renezander030@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:05:00 +0000 Subject: [PATCH] Compare the command references independent of checkout line endings The drift test read docs/command-reference.json and .md as checked out; a Windows checkout with core.autocrlf turns them into CRLF while the generator writes LF, so platform smoke (windows-latest) failed on 0.36.0. The test now compares after turning CRLF into LF. Co-Authored-By: Claude Opus 5.5 --- test/command-reference.test.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/command-reference.test.mjs b/test/command-reference.test.mjs index 7b4545a..18c1571 100644 --- a/test/command-reference.test.mjs +++ b/test/command-reference.test.mjs @@ -9,6 +9,9 @@ it("committed command references equal what describe generates", () => { const described = spawnCli(["describe"]); assert.equal(described.status, 0, described.stderr); const docs = renderCommandDocs(described.json); - assert.equal(readFileSync(new URL("../docs/command-reference.json", import.meta.url), "utf8"), docs.json); - assert.equal(readFileSync(new URL("../docs/command-reference.md", import.meta.url), "utf8"), docs.markdown); + // A Windows checkout may turn LF into CRLF (core.autocrlf); the generator writes LF. + const committed = (name) => + readFileSync(new URL(`../docs/${name}`, import.meta.url), "utf8").replaceAll("\r\n", "\n"); + assert.equal(committed("command-reference.json"), docs.json); + assert.equal(committed("command-reference.md"), docs.markdown); });