mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
fix: Normalize file path separators for Windows in test_repo_map_sample_code_base
This commit is contained in:
parent
2d5b481205
commit
97a75ea471
1 changed files with 6 additions and 0 deletions
|
@ -457,6 +457,12 @@ class TestRepoMapAllLanguages(unittest.TestCase):
|
|||
with open(expected_map_file, "r", encoding="utf-8") as f:
|
||||
expected_map = f.read().strip()
|
||||
|
||||
# Normalize path separators for Windows
|
||||
if os.name == 'nt': # Check if running on Windows
|
||||
import re
|
||||
expected_map = re.sub(r'tests/fixtures/sample-code-base/([^:]+)', r'tests\\fixtures\\sample-code-base\\\1', expected_map)
|
||||
generated_map_str = re.sub(r'tests/fixtures/sample-code-base/([^:]+)', r'tests\\fixtures\\sample-code-base\\\1', generated_map_str)
|
||||
|
||||
# Compare the generated map with the expected map
|
||||
if generated_map_str != expected_map:
|
||||
# If they differ, show the differences and fail the test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue