mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
test: add tests for --[no-]detect-urls CLI option
This commit is contained in:
parent
a79ce7a151
commit
f4b964a4b8
1 changed files with 30 additions and 0 deletions
|
@ -637,6 +637,36 @@ class TestMain(TestCase):
|
|||
)
|
||||
self.assertTrue(coder.suggest_shell_commands)
|
||||
|
||||
def test_detect_urls_default(self):
|
||||
with GitTemporaryDirectory():
|
||||
coder = main(
|
||||
["--exit", "--yes"],
|
||||
input=DummyInput(),
|
||||
output=DummyOutput(),
|
||||
return_coder=True,
|
||||
)
|
||||
self.assertTrue(coder.detect_urls)
|
||||
|
||||
def test_detect_urls_disabled(self):
|
||||
with GitTemporaryDirectory():
|
||||
coder = main(
|
||||
["--no-detect-urls", "--exit", "--yes"],
|
||||
input=DummyInput(),
|
||||
output=DummyOutput(),
|
||||
return_coder=True,
|
||||
)
|
||||
self.assertFalse(coder.detect_urls)
|
||||
|
||||
def test_detect_urls_enabled(self):
|
||||
with GitTemporaryDirectory():
|
||||
coder = main(
|
||||
["--detect-urls", "--exit", "--yes"],
|
||||
input=DummyInput(),
|
||||
output=DummyOutput(),
|
||||
return_coder=True,
|
||||
)
|
||||
self.assertTrue(coder.detect_urls)
|
||||
|
||||
def test_chat_language_spanish(self):
|
||||
with GitTemporaryDirectory():
|
||||
coder = main(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue