From 70f42102fc4b6abe1b26af2233db16c6de6181fe Mon Sep 17 00:00:00 2001 From: haelyra <49814733+haelyra@users.noreply.github.com> Date: Fri, 28 Aug 2026 16:25:30 -0400 Subject: [PATCH] test(evolve): support Windows line endings --- tests/scripts/instinct-cli-evolve-generate.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/scripts/instinct-cli-evolve-generate.test.js b/tests/scripts/instinct-cli-evolve-generate.test.js index dd6a0dc40..6459a56d9 100644 --- a/tests/scripts/instinct-cli-evolve-generate.test.js +++ b/tests/scripts/instinct-cli-evolve-generate.test.js @@ -245,10 +245,10 @@ test('preview names match the files --generate writes', () => { function parseFrontmatter(filePath) { const raw = fs.readFileSync(filePath, 'utf8'); - const match = /^---\n([\s\S]*?)\n---\n/.exec(raw); + const match = /^---\r?\n([\s\S]*?)\r?\n---\r?\n/.exec(raw); if (!match) return null; const fm = {}; - for (const line of match[1].split('\n')) { + for (const line of match[1].split(/\r?\n/)) { const idx = line.indexOf(':'); if (idx > 0 && !line.startsWith(' ')) { fm[line.slice(0, idx).trim()] = line.slice(idx + 1).trim(); @@ -321,7 +321,7 @@ test('generated descriptions quote YAML comment markers', () => { const commandsDir = path.join(root, 'evolved', 'commands'); const descriptions = generatedCommands(root).map(file => fs.readFileSync(path.join(commandsDir, file), 'utf8') - .split('\n') + .split(/\r?\n/) .find(line => line.startsWith('description: ')) ); const description = descriptions.find(line => line.includes('# preserve this text'));