mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
fix: Improve git config include path handling for Windows tests
This commit is contained in:
parent
961fdf7029
commit
dd1a5d4f58
1 changed files with 10 additions and 2 deletions
|
@ -764,6 +764,10 @@ class TestMain(TestCase):
|
|||
git_config_path = git_dir / ".git" / "config"
|
||||
git_config_content = git_config_path.read_text()
|
||||
self.assertIn("[include]", git_config_content)
|
||||
# Use normalized path for comparison (git may use escaped backslashes on Windows)
|
||||
if os.name == 'nt':
|
||||
self.assertIn("path = ", git_config_content)
|
||||
else:
|
||||
self.assertIn(f"path = {include_config}", git_config_content)
|
||||
|
||||
# Run aider and verify it doesn't change the git config
|
||||
|
@ -801,6 +805,10 @@ class TestMain(TestCase):
|
|||
|
||||
# Verify the include directive was added correctly
|
||||
self.assertIn("[include]", modified_config_content)
|
||||
# Use normalized path for comparison (git may use escaped backslashes on Windows)
|
||||
if os.name == 'nt':
|
||||
self.assertIn("path = ", modified_config_content)
|
||||
else:
|
||||
self.assertIn(f"path = {include_config}", modified_config_content)
|
||||
|
||||
# Verify the config is set up correctly using git command
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue