From c8dfd2930d9b9bef8980399b5d8ff2388be83667 Mon Sep 17 00:00:00 2001 From: tianma-if Date: Thu, 13 Aug 2026 20:56:52 +0800 Subject: [PATCH] test(deploy): normalize Windows line endings --- tests/deployment-entrypoints.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/deployment-entrypoints.test.ts b/tests/deployment-entrypoints.test.ts index b2c1545e..9aff5fc7 100644 --- a/tests/deployment-entrypoints.test.ts +++ b/tests/deployment-entrypoints.test.ts @@ -17,7 +17,9 @@ import { import { decideUpstreamSync } from "../scripts/upstream-sync-plan.mjs"; const repositoryRoot = resolve(import.meta.dir, ".."); -const readRepositoryFile = (path: string) => readFileSync(resolve(repositoryRoot, path), "utf8"); +const normalizeLineEndings = (value: string) => value.replace(/\r\n/g, "\n"); +const readRepositoryFile = (path: string) => + normalizeLineEndings(readFileSync(resolve(repositoryRoot, path), "utf8")); const extractTextPrompt = (document: string, sectionHeading: string) => { const sectionStart = document.indexOf(sectionHeading); if (sectionStart === -1) throw new Error(`Missing deployment section: ${sectionHeading}`); @@ -53,6 +55,7 @@ const initializeSyncFixture = (cwd: string) => { runFixtureGit(cwd, "init", "-b", "main"); runFixtureGit(cwd, "config", "user.name", "EdgeEver Test"); runFixtureGit(cwd, "config", "user.email", "edgeever-test@example.com"); + runFixtureGit(cwd, "config", "core.autocrlf", "false"); }; const prepareFixtureUpstreamSync = ( cwd: string,