test: read the supported-tools page with normalized line endings

The new docs-claims test split sections on "\n", which finds nothing in a
Windows checkout with core.autocrlf, so all three cases failed on
windows-pwsh. The page is now read with CRLF normalized; verified locally
against a CRLF copy of the file.

Part of #2022

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Clay Good
2026-10-14 10:05:29 -05:00
co-authored by Claude Opus 5.5
parent d0f268cd0d
commit 0b192a02c1
+5 -4
View File
@@ -6,10 +6,11 @@ import { AI_TOOLS } from '../src/core/config.js';
import { CommandAdapterRegistry } from '../src/core/command-generation/index.js';
const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const SUPPORTED = fs.readFileSync(
path.join(REPO_ROOT, 'docs-lab', 'reference', 'supported-tools.md'),
'utf-8'
);
// A Windows checkout with core.autocrlf rewrites line endings, and the
// section splits below key on "\n".
const SUPPORTED = fs
.readFileSync(path.join(REPO_ROOT, 'docs-lab', 'reference', 'supported-tools.md'), 'utf-8')
.replace(/\r\n/g, '\n');
const section = (heading: string) =>
SUPPORTED.split(`### ${heading}\n`)[1].split('\n### ')[0];
const tool = (id: string) => AI_TOOLS.find((candidate) => candidate.value === id)!;