mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
style: Normalize path separators for Windows
This commit is contained in:
parent
97a75ea471
commit
26765cd89a
1 changed files with 12 additions and 3 deletions
|
@ -458,10 +458,19 @@ class TestRepoMapAllLanguages(unittest.TestCase):
|
|||
expected_map = f.read().strip()
|
||||
|
||||
# Normalize path separators for Windows
|
||||
if os.name == 'nt': # Check if running on 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)
|
||||
|
||||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue