mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
feat: Add test for --read option
This commit is contained in:
parent
1557bb0c00
commit
6146ea0189
1 changed files with 14 additions and 0 deletions
|
@ -396,3 +396,17 @@ class TestMain(TestCase):
|
|||
output=DummyOutput(),
|
||||
)
|
||||
MockRepoMap.assert_called_once()
|
||||
|
||||
def test_read_option(self):
|
||||
with GitTemporaryDirectory():
|
||||
test_file = "test_file.txt"
|
||||
Path(test_file).touch()
|
||||
|
||||
coder = main(
|
||||
["--read", test_file, "--exit", "--yes"],
|
||||
input=DummyInput(),
|
||||
output=DummyOutput(),
|
||||
return_coder=True,
|
||||
)
|
||||
|
||||
self.assertIn(str(Path(test_file).resolve()), coder.abs_read_only_fnames)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue