Skip to content

Commit 5069b46

Browse files
committed
test(core): clarify windows checksum regression
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 3f23b3e commit 5069b46

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/services/test_file_service.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,16 @@ async def test_write_unicode_content(tmp_path: Path, file_service: FileService):
169169

170170

171171
@pytest.mark.asyncio
172-
async def test_update_frontmatter_checksum_matches_persisted_bytes(
172+
async def test_update_frontmatter_checksum_matches_windows_crlf_persisted_bytes(
173173
tmp_path: Path, file_service: FileService, monkeypatch
174174
):
175-
"""Frontmatter writes should hash the stored file, not the pre-write string."""
175+
"""Windows-style CRLF writes should hash the stored file, not the pre-write string."""
176176
test_path = tmp_path / "note.md"
177177
test_path.write_text("# Note\nBody\n", encoding="utf-8")
178178

179179
async def fake_write_file_atomic(path: Path, content: str) -> None:
180-
# Trigger: simulate a writer that persists CRLF bytes like Windows text mode.
180+
# Trigger: simulate Windows text-mode persistence, where logical LF strings
181+
# land on disk as CRLF bytes.
181182
# Why: the regression happened when the stored bytes diverged from the LF string
182183
# used to build the checksum.
183184
# Outcome: this test proves FileService returns the checksum for the stored file.

0 commit comments

Comments
 (0)