Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

i18n test: read sources the same with CRLF line endings (Windows checkout)

Claude6ce48e0ee6ad
diff --git a/windows/tests/i18n.test.mjs b/windows/tests/i18n.test.mjs
index 4eb0f74e..7f836d54 100644
--- a/windows/tests/i18n.test.mjs
+++ b/windows/tests/i18n.test.mjs
@@ -201,7 +201,8 @@ function files(dir, ext) {
/** Source without comments (a doc example is not a key) or Rust test modules. */
function code(path) {
- let text = readFileSync(path, "utf8");
+ // Windows checkouts have CRLF line endings.
+ let text = readFileSync(path, "utf8").replace(/\r\n/g, "\n");
const tests = text.indexOf("#[cfg(test)]\nmod tests");
if (tests >= 0) text = text.slice(0, tests);
return text.split("\n").filter((line) => !/^\s*(\/\/|\*|\/\*)/.test(line)).join("\n");