mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
This commit is contained in:
parent
d2acb8e95e
commit
774589b376
2 changed files with 36 additions and 7 deletions
|
@ -372,3 +372,33 @@ class TestCommands(TestCase):
|
|||
commands.cmd_add(str(fname))
|
||||
|
||||
self.assertIn(str(fname.resolve()), coder.abs_fnames)
|
||||
|
||||
def test_cmd_add_abs_filename(self):
|
||||
with ChdirTemporaryDirectory():
|
||||
io = InputOutput(pretty=False, yes=False)
|
||||
from aider.coders import Coder
|
||||
|
||||
coder = Coder.create(models.GPT35, None, io)
|
||||
commands = Commands(io, coder)
|
||||
|
||||
fname = Path("file.txt")
|
||||
fname.touch()
|
||||
|
||||
commands.cmd_add(str(fname.resolve()))
|
||||
|
||||
self.assertIn(str(fname.resolve()), coder.abs_fnames)
|
||||
|
||||
def test_cmd_add_quoted_filename(self):
|
||||
with ChdirTemporaryDirectory():
|
||||
io = InputOutput(pretty=False, yes=False)
|
||||
from aider.coders import Coder
|
||||
|
||||
coder = Coder.create(models.GPT35, None, io)
|
||||
commands = Commands(io, coder)
|
||||
|
||||
fname = Path("file with spaces.txt")
|
||||
fname.touch()
|
||||
|
||||
commands.cmd_add(f'"{fname}"')
|
||||
|
||||
self.assertIn(str(fname.resolve()), coder.abs_fnames)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue