Skip to content

Commit 7c37e49

Browse files
committed
test(core): preserve persisted windows newlines
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 7421cfc commit 7c37e49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/indexing/test_batch_indexer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ async def test_batch_indexer_returns_original_markdown_content_when_no_frontmatt
269269
# Why: this assertion cares about "no rewrite happened", not about forcing one newline
270270
# convention across platforms.
271271
# Outcome: compare against the exact markdown text stored on disk for this file.
272-
persisted_content = (project_config.home / path).read_text()
272+
persisted_content = (project_config.home / path).read_bytes().decode("utf-8")
273273

274274
assert result.errors == []
275275
assert len(result.indexed) == 1
@@ -524,7 +524,7 @@ async def test_batch_indexer_uses_parsed_markdown_body_for_malformed_frontmatter
524524
# Why: Windows can still surface that unchanged file with CRLF line endings.
525525
# Outcome: compare the indexed markdown to the persisted file content, not the LF
526526
# test literal used to create it.
527-
persisted_content = (project_config.home / path).read_text()
527+
persisted_content = (project_config.home / path).read_bytes().decode("utf-8")
528528

529529
assert result.errors == []
530530
assert len(result.indexed) == 1

0 commit comments

Comments
 (0)