mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 05:14:59 +00:00
fix: update file path comparison in commands test to handle macOS prefix
This commit is contained in:
parent
ccdd333ba3
commit
347ad34038
1 changed files with 8 additions and 1 deletions
|
@ -830,7 +830,14 @@ class TestCommands(TestCase):
|
|||
break
|
||||
else:
|
||||
self.fail(f"No matching read-only command found for {external_file1_path}")
|
||||
self.assertIn(f"/read-only {external_file2_path}", commands_text)
|
||||
# Split commands and check each one
|
||||
for line in commands_text.splitlines():
|
||||
if line.startswith("/read-only "):
|
||||
saved_path = line.split(" ", 1)[1]
|
||||
if os.path.samefile(saved_path, external_file2_path):
|
||||
break
|
||||
else:
|
||||
self.fail(f"No matching read-only command found for {external_file2_path}")
|
||||
|
||||
# Clear the current session
|
||||
commands.cmd_reset("")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue