{"draft":null,"from":11,"to":12,"files":[{"path":"client/test/client.test.ts","added":41,"removed":1,"diff":"--- a/client/test/client.test.ts\n+++ b/client/test/client.test.ts\n@@ -51,7 +51,7 @@\n import { pulledText } from \"../src/queue.ts\";\n import { noteText, titleLine } from \"../src/review.ts\";\n import { screenAnswer, throughLink, unsafeLink, unsafePath } from \"../src/safety.ts\";\n-import { findBlocks, keepFrom, settleText } from \"../src/settle.ts\";\n+import { findBlocks, gitMarkerLine, keepFrom, settleText } from \"../src/settle.ts\";\n import { tar } from \"../src/tar.ts\";\n import { type Fake, startFake, untar } from \"./fake-server.ts\";\n \n@@ -4340,3 +4340,43 @@\n \t\tfor (const [path, data] of files) assert.deepEqual(back.get(path), data);\n \t});\n });\n+\n+describe(\"git conflict markers typed or left by hand\", () => {\n+\tit(\"finds what looks like a git conflict, and not abso's own blocks or a lone marker\", () => {\n+\t\tconst git = \"a\\n<<<<<<< HEAD\\nmine\\n=======\\ntheirs\\n>>>>>>> feature\\nb\\n\";\n+\t\tassert.equal(gitMarkerLine(git), 2);\n+\t\tassert.equal(gitMarkerLine(git.replaceAll(\"\\n\", \"\\r\\n\")), 2, \"CRLF files too\");\n+\t\tassert.equal(gitMarkerLine(\"a\\n=======\\nb\\n\"), undefined, \"a lone ======= is a heading underline\");\n+\t\tassert.equal(gitMarkerLine(\"<<<<<<< HEAD\\nmine\\n\"), undefined, \"no middle and no close\");\n+\t\tconst mine =\n+\t\t\t'<<<<<<< yours (unpublished)\\nx\\n||||||| before (version 3)\\ny\\n=======\\nz\\n>>>>>>> theirs: bob, version 4 \"m\"\\n';\n+\t\tassert.equal(gitMarkerLine(mine), undefined, \"abso's own blocks are settled with abso settle\");\n+\t});\n+\n+\tit(\"record and publish say so, once, and still send the file\", async () => {\n+\t\tconst { folders } = await project({ \"a.txt\": \"a\\n\" }, \"alice\");\n+\t\tconst dir = folders.alice!;\n+\t\twriteFileSync(join(dir, \"a.txt\"), \"a\\n<<<<<<< HEAD\\nmine\\n=======\\ntheirs\\n>>>>>>> feature\\n\");\n+\t\tconst said = await main([\"record\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.equal(said.exit, 0, said.stdout);\n+\t\tassert.match(said.stdout, /Note: a\\.txt has lines that look like a git conflict \\(from line 2\\)/);\n+\t\tconst again = await main([\"record\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.doesNotMatch(again.stdout, /git conflict/, \"nothing new was sent, so nothing to say\");\n+\t});\n+});\n+\n+describe(\"paths too long for Windows\", () => {\n+\tit(\"notes a long path once, as it is sent, and sends the file\", async () => {\n+\t\tconst { folders } = await project({ \"a.txt\": \"a\\n\" }, \"alice\");\n+\t\tconst dir = folders.alice!;\n+\t\tconst long = `${\"d\".repeat(80)}/${\"e\".repeat(80)}/f.txt`;\n+\t\tmkdirSync(join(dir, dirname(long)), { recursive: true });\n+\t\twriteFileSync(join(dir, long), \"deep\\n\");\n+\t\tconst said = await main([\"record\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.equal(said.exit, 0, said.stdout);\n+\t\tassert.match(said.stdout, /Note: d{80}\\/e{80}\\/f\\.txt is 167 characters inside the folder/);\n+\t\tassert.match(said.stdout, /Windows stops at 260/);\n+\t\tconst again = await main([\"record\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.doesNotMatch(again.stdout, /Windows stops at 260/, \"nothing new was sent\");\n+\t});\n+});"}],"unmatched":[]}